File indexing completed on 2024-04-28 09:46:47

0001 /*
0002     SPDX-FileCopyrightText: 2012 Jekyll Wu <adaptee@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef ENUMERATION_H
0008 #define ENUMERATION_H
0009 
0010 namespace Konsole
0011 {
0012 /**
0013  * This class serves as a place for putting enum definitions that are
0014  * used or referenced in multiple places in the code. Keep it small.
0015  */
0016 class Enum
0017 {
0018 public:
0019     /**
0020      * This enum describes the modes available to remember lines of output
0021      * produced by the terminal.
0022      */
0023     enum HistoryModeEnum {
0024         /** No output is remembered.  As soon as lines of text are scrolled
0025          * off-screen they are lost.
0026          */
0027         NoHistory = 0,
0028         /** A fixed number of lines of output are remembered.  Once the
0029          * limit is reached, the oldest lines are lost.
0030          */
0031         FixedSizeHistory = 1,
0032         /** All output is remembered for the duration of the session.
0033          * Typically this means that lines are recorded to
0034          * a file as they are scrolled off-screen.
0035          */
0036         UnlimitedHistory = 2,
0037     };
0038 
0039     /**
0040      * This enum describes the positions where the terminal display's
0041      * scroll bar may be placed.
0042      */
0043     enum ScrollBarPositionEnum {
0044         /** Show the scroll-bar on the left of the terminal display. */
0045         ScrollBarLeft = 0,
0046         /** Show the scroll-bar on the right of the terminal display. */
0047         ScrollBarRight = 1,
0048         /** Do not show the scroll-bar. */
0049         ScrollBarHidden = 2,
0050     };
0051 
0052     /**
0053      * This enum describes the amount that Page Up/Down scroll by.
0054      */
0055     enum ScrollPageAmountEnum {
0056         /** Scroll half page */
0057         ScrollPageHalf = 0,
0058         /** Scroll full page */
0059         ScrollPageFull = 1,
0060     };
0061 
0062     /** This enum describes semantic hints appearance
0063      */
0064     enum Hints {
0065         HintsNever = 0,
0066         HintsURL = 1,
0067         HintsAlways = 2,
0068     };
0069 
0070     /** This enum describes the shapes used to draw the cursor in terminal
0071      * displays.
0072      */
0073     enum CursorShapeEnum {
0074         /** Use a solid rectangular block to draw the cursor. */
0075         BlockCursor = 0,
0076         /** Use an 'I' shape, similar to that used in text editing
0077          * applications, to draw the cursor.
0078          */
0079         IBeamCursor = 1,
0080         /** Draw a line underneath the cursor's position. */
0081         UnderlineCursor = 2,
0082     };
0083 
0084     /** This enum describes the behavior of triple click action . */
0085     enum TripleClickModeEnum {
0086         /** Select the whole line underneath the cursor. */
0087         SelectWholeLine = 0,
0088         /** Select from the current cursor position to the end of the line. */
0089         SelectForwardsFromCursor = 1,
0090     };
0091 
0092     /** This enum describes the source from which mouse middle click pastes data . */
0093     enum MiddleClickPasteModeEnum {
0094         /** Paste from X11 Selection. */
0095         PasteFromX11Selection = 0,
0096         /** Paste from Clipboard. */
0097         PasteFromClipboard = 1,
0098     };
0099 
0100     /**
0101      * This enum describes the text editor cmd used to open local text file URLs
0102      * in Konsole, where line and column data are appended to the file URL, e.g.:
0103      * /path/to/file:123:123
0104      */
0105     enum TextEditorCmd {
0106         Kate = 0,
0107         KWrite,
0108         KDevelop,
0109         QtCreator,
0110         Gedit,
0111         gVim,
0112         CustomTextEditor,
0113     };
0114 
0115     /**
0116      * This enum describes the different types of sounds and visual effects which
0117      * can be used to alert the user when a 'bell' occurs in the terminal
0118      * session.
0119      */
0120     enum BellModeEnum {
0121         /** trigger system beep. */
0122         SystemBeepBell = 0,
0123         /** trigger system notification. */
0124         NotifyBell = 1,
0125         /** trigger visual bell(inverting the display's colors briefly). */
0126         VisualBell = 2,
0127         /** No bell effects */
0128         NoBell = 3,
0129     };
0130 
0131     /**
0132      * This enum describes the strategies available for searching
0133      * through the session's output.
0134      */
0135     enum SearchDirection {
0136         /** Searches forwards through the output, starting at the
0137          * current selection.
0138          */
0139         ForwardsSearch,
0140         /** Searches backwards through the output, starting at the
0141          * current selection.
0142          */
0143         BackwardsSearch,
0144     };
0145 };
0146 }
0147 #endif // ENUMERATION_H