![]() ULTIMATE Page Control Suite™ |
|
Ultimate Page Control Suite™ Win32 | Delphi™ | C++Builder™ |
|
D.13. TADVANCE_PMInterface, FocusedPageIndex PROPERTY EDITOR |
|
TComponent TADVANCE_PMInterface TADVANCE_PMInterface_TLR TADVANCE_PMInterface_TLR_BiDirectionalSizing_MAIN TADVANCE_PMInterface_TLR_BiDirectionalSizing_EUC TADVANCE_PMInterface_PM07_RelTop TADVANCE_PMInterface_PM08_RelBot TADVANCE_PMInterface_PM10_Status TADVANCE_PMInterface_TLR_BiDirectionalSizing_MAIN_COMPOSITE TADVANCE_PMInterface_TLR_HorizontalSizing TADVANCE_PMInterface_TLR_TOOL TADVANCE_PMInterface_TLR_TOOL_EMBEDDED TADVANCE_PMInterface_PM2_ToolsTop TADVANCE_PMInterface_PM5_ToolsBot TADVANCE_PMInterface_TLR_TOOL_MAIN TADVANCE_PMInterface_PM05_ToolsIndependent TADVANCE_PMInterface_PM06_ToolsTop TADVANCE_PMInterface_PM09_ToolsBot TADVANCE_PMInterface_TLR_VerticalSizing TADVANCE_PMInterface_TLR_VerticalSizing_EMBEDDED TADVANCE_PMInterface_PM3_RelTop TADVANCE_PMInterface_PM4_RelBot TADVANCE_PMInterface_PM6_Status TADVANCE_PMInterface_T_BiDirectionalSizing TADVANCE_PMInterface_T_BiDirectionalSizing_EMBEDDED TADVANCE_PMInterface_T_BiDirectionalSizing_MAIN TADVANCE_PMInterface_PM01_PageArray TADVANCE_PMInterface_T_BiDirectionalSizing_MAIN_COMPOSITE TADVANCE_PMInterface_PM02_PagesToolsAndRelated TADVANCE_PMInterface_PM03_UltimatePageArray TADVANCE_PMInterface_PM04_DataMasterUPA TADVANCE_PMInterface is the nucleus of UPC™ paging functionality. Each PMInterface manages one internalized paging region. Every TADVANCE_PMInterface is a direct member of the root module.
PMInterfaces, PM1_Main...PM6_Status, of a PM04_DataMaster UPC™ module in the Object Inspector, with the PM1_Main node expanded. Naming conventions list TADVANCE_PMInterfaces according the top-downward physical order of their FocusControls, as drawn by the page control. |
|
EVENTS |
|
property BeforeChangeFocus : TNotifyEvent read FBeforeChangeFocus write FBeforeChangeFocus;
Called before focusing a different page.
property OnChangeFocus : TNotifyEvent read FOnChangeFocus write FOnChangeFocus;
Called after focusing a different page. Individual pages also publish an OnFocus event.
property OnHideAllPages : TNotifyEvent read FOnHideAllPages write FOnHideAllPages;
Called by the HideAllPages method. The alternative FocusNone method (internally called by HideAllPages) can be called to avoid invoking the OnHideAllPages event.
property OnWrap : TNotifyEvent read FOnWrap write FOnWrap;
OnWrap is fired only after wrapping is performed. When resizing occurs, if no tools require relocation, OnWrap is not called. |
|
SIZING EVENTS |
Sizing events in the Object Inspector. |
|
property Sizing_HeightMaximizeMethod : TNotifyEvent read FSizing_HeightMaximizeMethod write SetSizing_HeightMaximizeMethod;
property Sizing_HeightMinimizeMethod : TNotifyEvent read FSizing_HeightMinimizeMethod write SetSizing_HeightMinimizeMethod;
property Sizing_HeightNormalizeMethod : TNotifyEvent read FSizing_HeightNormalizeMethod write SetSizing_HeightNormalizeMethod;
property Sizing_WidthAndHeightMaximizeMethod : TNotifyEvent read FSizing_WidthAndHeightMaximizeMethod write SetSizing_WidthAndHeightMaximizeMethod;
property Sizing_WidthAndHeightMinimizeMethod : TNotifyEvent read FSizing_WidthAndHeightMinimizeMethod write SetSizing_WidthAndHeightMinimizeMethod;
property Sizing_WidthAndHeightNormalizeMethod : TNotifyEvent read FSizing_WidthAndHeightNormalizeMethod write SetSizing_WidthAndHeightNormalizeMethod;
property Sizing_WidthMaximizeMethod : TNotifyEvent read FSizing_WidthMaximizeMethod write SetSizing_WidthMaximizeMethod;
property Sizing_WidthMinimizeMethod : TNotifyEvent read FSizing_WidthMinimizeMethod write SetSizing_WidthMinimizeMethod;
property Sizing_WidthNormalizeMethod : TNotifyEvent read FSizing_WidthNormalizeMethod write SetSizing_WidthNormalizeMethod;
The SizingWindow™. From left to right, sizing tools are Sizing_WidthMinimize, Sizing_WidthNormalize, Sizing_WidthMaximize, Sizing_HeightMinimize, Sizing_HeightNormalize, Sizing_HeightMaximize, Sizing_WidthAndHeightMinimize, Sizing_WidthAndHeightNormalize, Sizing_WidthAndHeightMaximize, and Closure. |
|
The SizingWindow™ is invoked by right MouseDown of the FocusButton™. Handlers are dynamically wired to tools at run time, and may size a region by any legitimate direct or indirect means. Handler existence automatically configures the FocusButton.Hint, response to right mouse-down, and displayed sizing tools. All you have to do is write handlers. Example source is found in the UPC™ Demos. |
|
METHODS |
|
HOW PAGEGROUPS WORK, AND HOW PAGEGROUP MEMBERSHIP IS HANDLED BY PAGE PROPAGATION METHODS |
|
To maintain intended PageGroup™ membership with methods which affect the organization or population of the Pages[] array, we have to understand how PageGroup™ membership is implemented.
Any system you deploy therefore can implement either explicit or implicit membership. |
|
HOW PAGE DELETION METHODS MANAGE PAGEGROUP MEMBERSHIP FOR YOU |
|
When propagating pages, PageGroup™ membership is explicitly indicated by AddPageAt() arguments. The DeleteFocusedPage() and DeletePageAtIndex(Index) page deletion methods however can interpret how to handle page membership issues, and require no arguments to accurately do so:
The comprehensive behavior or these methods mean that you do not have to address membership issues when destroying pages, because the integrity of your explicit or implicit membership system is maintained. |
|
PAGE PROPAGATION |
|
function AddPageAt(TargetIndex: Integer; Focus: Boolean; GroupWith: TADVANCE_GroupWith): Integer;
TADVANCE_GroupWith = (gwPrec, gwNext, gwNone);
Creates a new page at a rectified TargetIndex of the Pages[] array and returns the index of the result page, or -1 if unsuccessful.
|
|
DELPHI AddPageAt EXAMPLES C++ AddPageAt EXAMPLES |
|
procedure DeleteFocusedPage;
Deletes and destroys the focused page (if any) and focuses a secure alternative. Also see How Page Deletion Methods Manage PageGroup Membership for You. |
|
DELPHI EXAMPLE C++ EXAMPLE |
|
procedure DeletePageAtIndex(Index: Integer);
Deletes and destroys the page at Index (if any).
Also see How Page Deletion Methods Manage PageGroup Membership for You. |
|
DELPHI EXAMPLE C++ EXAMPLE |
|
FocusedPageIsAssignedAndNotNil: Boolean;
Validates that a FocusedPage can be processed in terms of:
DELPHI EXAMPLE C++ EXAMPLE |
|
NAVIGATION — SECURITY, DETERMINATION OF ALTERNATE FOCUSABLE PAGES |
HOW PAGE SECURITY IS TREATED BY NAVIGATION METHODS AND THE NAVIGATION WINDOW |
|
Alternate secure and general navigation methods allow implementations to respect page security settings or to provide general navigation to all pages as is required at design time in the IDE. Pages feature two boolean security properties. Secure navigation methods will not focus pages having either property set to False, and seek secure alternatives to the excluded pages. NavigationWindow processes treat these properties as follows:
Consequently, the NavigationWindow automatically provides secure navigation, and no concern exists but setting page security properties as intended. |
|
HOW ALTERNATE FOCUSABLE PAGES ARE SOUGHT BY SECURE NAVIGATION METHODS |
|
|
GENERAL NAVIGATION |
|
procedure FocusFirstPage;
procedure FocusPrecedingPage;
procedure FocusNextPage;
procedure FocusLastPage;
General navigation methods do not respect page security properties. They will focus every page. |
|
DELPHI EXAMPLES C++ EXAMPLES |
|
SECURE NAVIGATION |
|
procedure FocusFirstPage_SECURE;
procedure FocusPrecedingPage_SECURE;
procedure FocusNextPage_SECURE;
procedure FocusLastPage_SECURE;
Secure navigation methods respect page security properties. |
|
DELPHI EXAMPLES C++ EXAMPLES |
|
function FocusSECUREAlternativeToPage_ReturnIndex(APage: TADVANCE_Page): Integer;
Focuses a secure alternative to APage.
DELPHI EXAMPLE C++ EXAMPLE |
|
METHODS CONTINUED... |
|
procedure FocusNone;
Defocuses all pages without firing the OnHideAllPages event.
DELPHI EXAMPLE C++ EXAMPLE |
|
procedure HideAllPages;
Calls FocusNone and fires the OnHideAllPages event.
DELPHI EXAMPLE C++ EXAMPLE |
|
function IsMemberOfPages(const ProspectiveMember: TADVANCE_Page): Boolean;
Determines if ProspectiveMember is a member of the Pages[] TList. |
|
DELPHI EXAMPLE C++ EXAMPLE |
|
function RectifyIndexArg(var IndexArgument: Integer): Integer;
Rectifies IndexArgument to the legitimate index range of Pages[] (TList).
DELPHI EXAMPLE C++ EXAMPLE |
|
function RectifyIndexArgToPotentialInsert(var IndexArgument: Integer): Integer;
Rectifies IndexArgument to a value of 0...PageCount.
DELPHI EXAMPLE C++ EXAMPLE |
|
PROPERTIES |
|
property FocusedPage : TADVANCE_Page read FFocusedPage write SetFocusedPage;
Not published. At run time, you may assign a pointer to a member of Pages[] to FocusedPage to focus the page. See FocusedPageIndex for related information.
property FocusControl : TADVANCE_FocusControlInterface read IFocusControl write IFocusControl;
Interface to the FocusControl. See TADVANCE_FocusControlInterface for further information. |
|
FocusedPageIndex PROPERTY EDITOR, PROPERTY EDITOR FUNCTIONS |
The FocusedPageIndex property ellipsis invokes the FocusedPageIndex property editor. |
FocusedPageIndex property editor. FUNCTIONS
|
|
property FocusedPageIndex : Integer read FFocusedPageIndex write SetFocusedPageIndex stored True;
The FocusedPageIndex property is the primary mechanism for focusing pages, and for administering the page population at design time.
Also see FocusedPage above. |
|
property NavigationWindowPrescription : TADVANCE_NavigationWindowPrescription read FNavigationWindowPrescription write FNavigationWindowPrescription;
Configures the NavigationWindow. See TADVANCE_NavigationWindowPrescription for further information.
property PageCount : Integer read GetPageCount;
Count of the Pages[] property. |
|
DELPHI EXAMPLE C++ EXAMPLE |
|
public PageCreationClass: TADVANCE_Page_ClassReference
To propagate custom page classes, assign __classid(TYourClassName) (C++) or TYourClassName (Delphi) of your page descendant to PageCreationClass. Alternate class IDs may be assigned at run time to maintain unlimited page classes. See Subclassing TADVANCE_Page Descendants to Dynamically Populate Pages with Controls for further information. |
|
DELPHI EXAMPLE C++ EXAMPLE |
|
property PageGroups : TADVANCE_PageGroup_Collection read FPageGroups write FPageGroups;
Collection of PageGroup items to which a page may belong. At design time, PageGroups are maintained by the PageGroups property editor. See TADVANCE_PageGroup_Collection, TADVANCE_NavigationWindowPrescription, and How PageGroups Work, and How PageGroup Membership is Handled by Page Propagation Methods for related information.
property PageGroupsCount: Integer read GetPageGroupsCount;
Read-only count of the PageGroups collection property.
property PageNamingParams : TADVANCE_PageNamingParams read FPageNamingParams write FPageNamingParams;
See TADVANCE_PageNamingParams.
property PageParent_Caption : String read FPageParent_Caption write SetPageParent_Caption;
The PageParent region parents the pages of a module.
property PageParent_Height : Integer read FPageParent_Height write SetPageParent_Height;
In Related and Status modules, PageParent_Height sets the height of the PageParent region. See RenderToPageHeightOnFocusPage and TADVANCE_Page.PageHeightOnFocusPage for further information.
property Pages[Index: Integer] : TADVANCE_Page read GetPage;
Referring to Pages[Index] is the equivalent of a pointer to a page. Because pages are contained in a TList (dynamic array of pointers), the methods of TList can be applied to Pages[]. The following examples for instance call TList.Move() to move a page from its current index position to a target index position. |
|
DELPHI MOVE PAGE EXAMPLE C++ MOVE PAGE EXAMPLE |
|
property RenderToPageHeightOnFocusPage : Boolean read FRenderToPageHeightOnFocusPage write SetRenderToPageHeightOnFocusPage default False;
RenderToPageHeightOnFocusPage causes the module to render intended page heights as pages are focused.
See PageParent_Height and TADVANCE_Page.PageHeightOnFocusPage for further information.
property ToolButton_ProportionalSpacerWidthPercent : TADVANCE_ToolButton_ProportionalSpacerWidthPercent read FToolButton_ProportionalSpacerWidthPercent write SetToolButton_ProportionalSpacerWidthPercent default pswp100;
TADVANCE_ToolButton_ProportionalSpacerWidthPercent = (pswp100, pswp050, pswp025);
Prescribes button spacer width as a percentage of button width.
property Wrap : Boolean read FWrap write SetWrap default True;
Enables or disables Paged Toolbar™ wrapping.
property Wrap_OffAtWidthLessThan : Integer read FWrap_OffAtWidthLessThan write SetWrap_OffAtWidthLessThan default 10;// [Minimum = 25, Maximum = 25000]
Disables Paged Toolbar™ wrapping when client width is less than Wrap_OffAtWidthLessThan. |
|
|