SetEditorMode method

[Top]  [Chapter] 

Applies to

WPDLLInt

Declaration

procedure SetEditorMode(Mode: Integer; XMode: Integer; GUI1: Integer; GUI2: Integer);

Description

TextDynamic can work in several different ways. The mode is selected by using the method WPDLLInt1.SetEditorMode(). One Control can host two editors at once, for example to support split screen: the start and the end of a longer text is displayed at the same time.

WPDLLInt1.SetEditorMode(

 EditorMode.wpmodSingleEditor,

 EditorXMode.wpmodexToolbarLG,

 // EditorGUI.wpguiGutter +

 EditorGUI.wpguiHorzScrollBar |

 EditorGUI.wpguiPanelH1|

 // EditorGUI.pguiPanelH2 |

 EditorGUI.wpguiPanelV1|

 EditorGUI.wpguiPanelV2 |

 EditorGUI.wpguiRuler  |

 EditorGUI.wpguiVertRuler  |

 EditorGUI.wpguiVertScrollBar

 , EditorGUI.wpguiDontSet);

Parameters

Mode

a) wpmodSingleEditor = 0: Simple editor

 

b) wpmodDoubleEditor = 1: two Editors - working with 2 different texts. Both text are using the same paragraph styles. This mode is reserved for the future to easy the creation of reports. In one editor the report template would be displayed, the other displays the created report. Usually the DLL works with the upper, Editor 1. To switch to Editor 2 the method SelectEditor can be used. Most of the events pass a parameter 'editor' which is 1 for the upper, 2 for the lower editor.

 

c) wpmodSplitEditor = 2: Editor with split screen - the same text is edited in both windows. But each window can use a different zoom level and layout mode. Both windows can show a different position in the text.Most of the events pass a parameter 'editor' which is 1 for the upper, 2 for the lower editor.

 

d) wpmodSplitThumbnails = 3: Editor and Preview/Thumbnail display. This mode is almost identical to the 'split screen' mode. The lower editor is readonly though.

XMode

In addition to the general operation modes certain special features can be activated using property ModeX. This following flags are possible:

wpxtraToolbar    = 1; - Select the 16x16 toolbar

wpxtraToolbarLG    = 2 - Select 24x24 Toolbar

wpxtraSpellcheck = 4 -  Activate the Spellcheck

wpxtraTables     = 8 -  Activate support for tables (in toolbar)

wpxtraPDFExport  = 16 -  Activate the wPDF PDF Export

wpxtraReporting  =32 -  Activate the WPReporter in EditorA (cannot be used in 'Split' mode!)

 

Please note that setting a flag will have no effect if you do not have the license to use i.e. the PDF export.

Gui1

This parameter selects the graphical user interface (gui) elements used by the editor 1.

  wpguiRuler       = 2, // Select a ruler

  wpguiVertScrollBar=4, // Select the vertical scrollbar

  wpguiHorzScrollBar=8, // Select the horizontal Scrollbar

  wpguiVertRuler   =16, // Select Vertical Ruler

  wpguiGutter      =32, // Select Gutter (pagno)

  wpguiPanelV1     =64, // Select the panel in top right corner

  wpguiPanelV2     =128,// Select the panel in the bottom rigth corner

  wpguiPanelH1     =256,// Select the panel in the bottom left corner

  wpguiPanelH2     =512; //Panel on the right side of wpguiPanelH1

  wpguiUnitsAreInch=1024;//Units used for ruler are inch instead of cm

 

If the flag wpguiDontSet (1) was used this parameter will be ignored. This is useful if you call SetEditorMode later to modify an editor.

Gui2

This parameter selects the graphical user interface (gui) elements used by the editor 2. If you do not use the second editor simply sepecify wpguiDontSet.

Category

Modify the layout of the text display


[idh_wpdllint_seteditormode.htm]    Copyright © 2007 by WPCubed GmbH