Layoutmodes

Top  Previous  Next

The different layout modes are probably one of the most exciting feature in WPTools 5. You will hardly find a component which offers this kind of versatility in a text editing tool.

 

Different layout modes are mainly activated in property LayoutMode

- but also the properties PageColumns, AutoZoom, Zooming, ViewOptions and OnPageGapGetText are important for the display of the text.

 

If you are using our multiview technology (multiple editors show one text), each editor can use different settings for the mentioned properties. So it is possible that one editor displays the thumbnails while a different editor shows the text in 'normal' mode!

 

Changing the layout modes is also extremely fast, usually the already formatted pages are rearranged on the virtual desktop!

 

Please note that the TWPPreview component also inherits from the usual editor component. So it has the same properties. But it also introduces the property SinglePageMode. If this property is true, unlike the default display of all pages in a row, only one row of pages will be displayed. BTW - if you are using the TWPPreview or TWPPreviewDlg you are already using the multiview technology.

 

Possible values of the property LayoutModes are:

 

wplayNormal : Only show the text area without margins - do not paint background color.

 

wpWordWrapView : Display like wplayNormal - used when the word wrap is set to the editor box.

 

wplayShowManualPageBreaks - like wpNormal but draws a dashed line for page breaks

 

wplayPageGap - display the text similar to wplayNormal with a bar iin between

 

wplayExtendedPageGap - works like wplayPageGap but does not suppress the left and right margin.

 

wplayPageGap example:

 

clip0044

 

The display of the page numbers ("--- 1") is activated using the ViewOption wpShowPageNRinGap. You can use the event OnGetPageGapText to display a different text.

 

wplayShrinkedLayout - show PageLayout without header and footer (reduces page height!)

 

wplayLayout - show PageLayout but do not paint header and footer.

 

wplayFullLayout - show PageLayout with header and footer.

 

wpDualPageView - display 2 pages side by side. A similar effect can be accieved by setting the property "PageColumns" to 2 but wpDualPageView makes sure the 2 pages are handled as 1 by the auto zoom function.

The DualPage view expects the first page to be ouside and the 2nd and 3rd to be side by side. If the property WPRichText.Memo.DualPageViewAlternate is true the first page is displayed side by side with the second.

 

wpThumbNailView - display thumb nails of the pages, optionally with display of the page numbers in little boxes. This is activated by ViewOption wpShowPageNRinGap.

clip0045

 

 

property ViewOptions

 

The following values are possible:

 

wpShowGridlines - draw a gray line for table borders which would mbe otherwise invisible

 

wpDisableHotStyles - disable the hot styles (or hover styles) which can be activated for hyperlinks or fields.

 

wpShowCR - show a clip0046 symbol at the end of a paragraph

 

wpShowFF - displays clip0047 at the end of a paragraph when the next paragraph starts on a new page

 

wpShowNL - displays an arrow for a new line

 

wpShowSPC - shows a dot for the code #32 (SPACE)

 

wpShowHardSPC - shows a dot for the code #160 (non breaking space)

 

wpShowTAB - show an arrow in the place of tabstops (suppressed if fillsigs are active)

 

wpShowParCalcNames - Display the names assigned using property WPAT_PAR_NAME

 

wpShowParCalcCommands - Display the formulas assigned to paragraphs and cells.

 

wpShowParNames- Display the names assigned using property TParagraph.Name

 

wpNoEndOfDocumentLine - display a line at the end of the document if not in pagegap mode. Ignore the typo 'No'.

 

wpHideSelection - Always hides the selection

 

wpHideSelectionNonFocussed - hides thenselection when editor does not have the focus

 

wpShowPageNRinGap - displays a number or any other text provided by event OnPageGapGetText either at the right border or in a box under the page

 

wpDrawFineUnderlines - always draw thin underlines

 

wpDontGrayHeaderFooterInLayout - do not shaed the header and footer texts

 

wpInfiniteTextArea - makes it possible to show a text as if it is infinite. This can be used for a scroller control, for example to show news or credits. To scroll change the property TopOffset in a timer event.

 

wpDontPaintPageFrame - with page layout modes, do not draw a frame around the page

 

wpCenterPaintPages - center the page horizontally in the window. This is useful for preview windows.

 

wpDrawPageMarginLines - draw dotted lines at the page margins.

 

wpDontDrawSectionMarker - do not draw the arrow which shows where a new section starts.

 

wpDrawHeaderFooterLines - draw gray lines around header/footer areas.

 

wpUseOwnDoubleBuffer - Usually a shared double buffer is used for all editors to limit the memory use - unless thumbnailmode has been activated or this flag is active.

 

clip0161

wpDontDisplayScrollPageHint - Do not display this default page number hint when pressing the scrollbar handle. The hint can be modified by changing the global string variable WPPageHintStr. The default is ' %d / %d '.                        

 

 

property AutoZoom

 

The following values are possible:

 

wpAutoZoomOff - use the value of property Zooming to change the aspect ratio of the text display

 

wpAutoZoomWidth - automatically adjust the aspect ratio to make room for the complete width of the page

 

wpAutoZoomFullPage - automatically adjust the aspect ratio to make room for the complete size of the page

 

wpAutoZoomAdjustColumnCount - automatically adjust the property PageColumns to show as many pages side by side as fit into the window. Usually the property Zooming should be set to a small value, for example 30.

 

wpAutoZoomAsManyAsPossibleInRow - show as many pages side by side but allow a different count of pages each row. You can see the effect in the lower editor in the section demo.  This mode should be also combined with a small zooming value.

 

Please note that the property CurrentZooming can be read to get the current aspect ratio as a floating point multiplicator.