diff -r 6e09a9a73cb7 -r 8b49d3e0b4c8 Documentation/Source/eric6.ViewManager.ViewManager.html --- a/Documentation/Source/eric6.ViewManager.ViewManager.html Sun Dec 31 18:54:06 2017 +0100 +++ b/Documentation/Source/eric6.ViewManager.ViewManager.html Mon Jan 01 19:06:33 2018 +0100 @@ -777,6 +777,9 @@ <td><a href="#ViewManager.getOpenEditorsCount">getOpenEditorsCount</a></td> <td>Public method to get the number of open editors.</td> </tr><tr> +<td><a href="#ViewManager.getOpenEditorsForSession">getOpenEditorsForSession</a></td> +<td>Public method to get a lists of all open editors.</td> +</tr><tr> <td><a href="#ViewManager.getOpenFilenames">getOpenFilenames</a></td> <td>Public method returning a list of the filenames of all editors.</td> </tr><tr> @@ -886,7 +889,7 @@ <td>Public slot to handle received editor commands.</td> </tr><tr> <td><a href="#ViewManager.removeSplit">removeSplit</a></td> -<td>Public method used to remove the current split view.</td> +<td>Public method used to remove the current split view or a split view by index.</td> </tr><tr> <td><a href="#ViewManager.replaceWidget">replaceWidget</a></td> <td>Public method to get a reference to the replace widget.</td> @@ -942,6 +945,9 @@ <td><a href="#ViewManager.setSbInfo">setSbInfo</a></td> <td>Public method to transfer statusbar info from the user interface to viewmanager.</td> </tr><tr> +<td><a href="#ViewManager.setSplitCount">setSplitCount</a></td> +<td>Public method to set the number of split views.</td> +</tr><tr> <td><a href="#ViewManager.setSplitOrientation">setSplitOrientation</a></td> <td>Public method used to set the orientation of the split view.</td> </tr><tr> @@ -966,6 +972,9 @@ <td><a href="#ViewManager.showWindowMenu">showWindowMenu</a></td> <td>Public method to set up the viewmanager part of the Window menu.</td> </tr><tr> +<td><a href="#ViewManager.splitCount">splitCount</a></td> +<td>Public method to get the number of split views.</td> +</tr><tr> <td><a href="#ViewManager.startSharedEdit">startSharedEdit</a></td> <td>Public slot to start a shared edit session for the current editor.</td> </tr><tr> @@ -1923,23 +1932,27 @@ </dd> </dl><a NAME="ViewManager._addView" ID="ViewManager._addView"></a> <h4>ViewManager._addView</h4> -<b>_addView</b>(<i>win, fn=None, noName="", addNext=False</i>) +<b>_addView</b>(<i>win, fn=None, noName="", addNext=False, indexes=None</i>) <p> Protected method to add a view (i.e. window). </p><dl> -<dt><i>win</i></dt> +<dt><i>win</i> (EditorAssembly)</dt> <dd> editor assembly to be added -</dd><dt><i>fn</i></dt> +</dd><dt><i>fn</i> (str)</dt> <dd> filename of this editor -</dd><dt><i>noName</i></dt> +</dd><dt><i>noName</i> (str)</dt> <dd> -name to be used for an unnamed editor (string) -</dd><dt><i>addNext</i></dt> +name to be used for an unnamed editor +</dd><dt><i>addNext</i> (bool)</dt> <dd> flag indicating to add the view next to the current - view (bool) + view +</dd><dt><i>indexes</i> (tuple of two int)</dt> +<dd> +of the editor, first the split view index, second the + index within the view </dd> </dl><dl> <dt>Raises <b>RuntimeError</b>:</dt> @@ -2392,23 +2405,27 @@ </dd> </dl><a NAME="ViewManager.getEditor" ID="ViewManager.getEditor"></a> <h4>ViewManager.getEditor</h4> -<b>getEditor</b>(<i>fn, filetype="", addNext=False</i>) +<b>getEditor</b>(<i>fn, filetype="", addNext=False, indexes=None</i>) <p> Public method to return the editor displaying the given file. </p><p> If there is no editor with the given file, a new editor window is created. </p><dl> -<dt><i>fn</i></dt> +<dt><i>fn</i> (str)</dt> <dd> filename to look for -</dd><dt><i>filetype</i></dt> +</dd><dt><i>filetype</i> (str)</dt> <dd> -type of the source file (string) -</dd><dt><i>addNext</i></dt> +type of the source file +</dd><dt><i>addNext</i> (bool)</dt> <dd> flag indicating that if a new editor needs to be - created, it should be added next to the current editor (bool) + created, it should be added next to the current editor +</dd><dt><i>indexes</i> (tuple of two int)</dt> +<dd> +of the editor, first the split view index, second the + index within the view </dd> </dl><dl> <dt>Returns:</dt> @@ -2416,6 +2433,11 @@ tuple of two values giving a flag indicating a new window creation and a reference to the editor displaying this file </dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, Editor) +</dd> </dl><a NAME="ViewManager.getMostRecent" ID="ViewManager.getMostRecent"></a> <h4>ViewManager.getMostRecent</h4> <b>getMostRecent</b>(<i></i>) @@ -2488,6 +2510,26 @@ <dd> number of open editors (integer) </dd> +</dl><a NAME="ViewManager.getOpenEditorsForSession" ID="ViewManager.getOpenEditorsForSession"></a> +<h4>ViewManager.getOpenEditorsForSession</h4> +<b>getOpenEditorsForSession</b>(<i></i>) +<p> + Public method to get a lists of all open editors. +</p><p> + The returned list contains one list per split view. If the view manager + cannot split the view, only one list of editors is returned. +</p><p> + Note: This method should be implemented by subclasses. +</p><dl> +<dt>Returns:</dt> +<dd> +list of list of editor references +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +list of list of Editor +</dd> </dl><a NAME="ViewManager.getOpenFilenames" ID="ViewManager.getOpenFilenames"></a> <h4>ViewManager.getOpenFilenames</h4> <b>getOpenFilenames</b>(<i></i>) @@ -2748,19 +2790,33 @@ Public slot to generate a new empty editor. </p><a NAME="ViewManager.newEditorView" ID="ViewManager.newEditorView"></a> <h4>ViewManager.newEditorView</h4> -<b>newEditorView</b>(<i>fn, caller, filetype=""</i>) +<b>newEditorView</b>(<i>fn, caller, filetype="", indexes=None</i>) <p> Public method to create a new editor displaying the given document. </p><dl> -<dt><i>fn</i></dt> +<dt><i>fn</i> (str)</dt> <dd> filename of this view -</dd><dt><i>caller</i></dt> +</dd><dt><i>caller</i> (Editor)</dt> <dd> reference to the editor calling this method -</dd><dt><i>filetype</i></dt> +</dd><dt><i>filetype</i> (str)</dt> +<dd> +type of the source file +</dd><dt><i>indexes</i> (tuple of two int)</dt> <dd> -type of the source file (string) +of the editor, first the split view index, second the + index within the view +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +reference to the new editor object +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +Editor </dd> </dl><a NAME="ViewManager.nextSplit" ID="ViewManager.nextSplit"></a> <h4>ViewManager.nextSplit</h4> @@ -2779,34 +2835,48 @@ </dd> </dl><a NAME="ViewManager.openSourceFile" ID="ViewManager.openSourceFile"></a> <h4>ViewManager.openSourceFile</h4> -<b>openSourceFile</b>(<i>fn, lineno=-1, filetype="", selStart=0, selEnd=0, pos=0, addNext=False</i>) +<b>openSourceFile</b>(<i>fn, lineno=-1, filetype="", selStart=0, selEnd=0, pos=0, addNext=False, indexes=None</i>) <p> Public slot to display a file in an editor. </p><dl> -<dt><i>fn</i></dt> +<dt><i>fn</i> (str)</dt> <dd> -name of file to be opened (string) -</dd><dt><i>lineno</i></dt> +name of file to be opened +</dd><dt><i>lineno</i> (int or list of int)</dt> <dd> -line number to place the cursor at (integer) or - list of line numbers (list of integers) (cursor will be - placed at the next line greater than the current one) -</dd><dt><i>filetype</i></dt> +line number to place the cursor at or list of line + numbers (cursor will be placed at the next line greater than + the current one) +</dd><dt><i>filetype</i> (str)</dt> <dd> -type of the source file (string) -</dd><dt><i>selStart</i></dt> +type of the source file +</dd><dt><i>selStart</i> (int)</dt> <dd> -start of an area to be selected (integer) -</dd><dt><i>selEnd</i></dt> +start of an area to be selected +</dd><dt><i>selEnd</i> (int)</dt> <dd> -end of an area to be selected (integer) -</dd><dt><i>pos</i></dt> +end of an area to be selected +</dd><dt><i>pos</i> (int)</dt> <dd> -position within the line to place the cursor at (integer) -</dd><dt><i>addNext</i></dt> +position within the line to place the cursor at +</dd><dt><i>addNext</i> (bool)</dt> <dd> flag indicating to add the file next to the current - editor (bool) + editor +</dd><dt><i>indexes</i> (tuple of two int)</dt> +<dd> +of the editor, first the split view index, second the + index within the view +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +reference to the opened editor +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +Editor </dd> </dl><a NAME="ViewManager.preferencesChanged" ID="ViewManager.preferencesChanged"></a> <h4>ViewManager.preferencesChanged</h4> @@ -2893,13 +2963,25 @@ </dd> </dl><a NAME="ViewManager.removeSplit" ID="ViewManager.removeSplit"></a> <h4>ViewManager.removeSplit</h4> -<b>removeSplit</b>(<i></i>) +<b>removeSplit</b>(<i>index=-1</i>) <p> - Public method used to remove the current split view. + Public method used to remove the current split view or a split view + by index. </p><dl> +<dt><i>index</i> (int)</dt> +<dd> +index of the split to be removed (-1 means to + delete the current split) +</dd> +</dl><dl> <dt>Returns:</dt> <dd> -Flag indicating successful deletion +flag indicating successful deletion +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl><a NAME="ViewManager.replaceWidget" ID="ViewManager.replaceWidget"></a> <h4>ViewManager.replaceWidget</h4> @@ -3118,6 +3200,16 @@ <dd> reference to the zoom widget (E5ZoomWidget) </dd> +</dl><a NAME="ViewManager.setSplitCount" ID="ViewManager.setSplitCount"></a> +<h4>ViewManager.setSplitCount</h4> +<b>setSplitCount</b>(<i>count</i>) +<p> + Public method to set the number of split views. +</p><dl> +<dt><i>count</i> (int)</dt> +<dd> +number of split views +</dd> </dl><a NAME="ViewManager.setSplitOrientation" ID="ViewManager.setSplitOrientation"></a> <h4>ViewManager.setSplitOrientation</h4> <b>setSplitOrientation</b>(<i>orientation</i>) @@ -3198,6 +3290,21 @@ <dd> Not implemented </dd> +</dl><a NAME="ViewManager.splitCount" ID="ViewManager.splitCount"></a> +<h4>ViewManager.splitCount</h4> +<b>splitCount</b>(<i></i>) +<p> + Public method to get the number of split views. +</p><dl> +<dt>Returns:</dt> +<dd> +number of split views +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +int +</dd> </dl><a NAME="ViewManager.startSharedEdit" ID="ViewManager.startSharedEdit"></a> <h4>ViewManager.startSharedEdit</h4> <b>startSharedEdit</b>(<i></i>)