Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.h
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | 71 | public: | |||
---|---|---|---|---|---|
107 | * | 107 | * | ||
108 | * @param cursor The position of the scroll bar's thumb. | 108 | * @param cursor The position of the scroll bar's thumb. | ||
109 | * @param slines The maximum value of the scroll bar. | 109 | * @param slines The maximum value of the scroll bar. | ||
110 | */ | 110 | */ | ||
111 | void setScroll(int cursor, int slines); | 111 | void setScroll(int cursor, int slines); | ||
112 | 112 | | |||
113 | void setScrollFullPage(bool fullPage); | 113 | void setScrollFullPage(bool fullPage); | ||
114 | bool scrollFullPage() const; | 114 | bool scrollFullPage() const; | ||
115 | void setHighlightScrolledLines(bool highlight); | ||||
115 | 116 | | |||
116 | /** | 117 | /** | ||
117 | * Returns the display's filter chain. When the image for the display is updated, | 118 | * Returns the display's filter chain. When the image for the display is updated, | ||
118 | * the text is passed through each filter in the chain. Each filter can define | 119 | * the text is passed through each filter in the chain. Each filter can define | ||
119 | * hotspots which correspond to certain strings (such as URLs or particular words). | 120 | * hotspots which correspond to certain strings (such as URLs or particular words). | ||
120 | * Depending on the type of the hotspots created by the filter ( returned by Filter::Hotspot::type() ) | 121 | * Depending on the type of the hotspots created by the filter ( returned by Filter::Hotspot::type() ) | ||
121 | * the view will draw visual cues such as underlines on mouse-over for links or translucent | 122 | * the view will draw visual cues such as underlines on mouse-over for links or translucent | ||
122 | * rectangles for markers. | 123 | * rectangles for markers. | ||
▲ Show 20 Lines • Show All 477 Lines • ▼ Show 20 Line(s) | 597 | private: | |||
600 | 601 | | |||
601 | // divides the part of the display specified by 'rect' into | 602 | // divides the part of the display specified by 'rect' into | ||
602 | // fragments according to their colors and styles and calls | 603 | // fragments according to their colors and styles and calls | ||
603 | // drawTextFragment() or drawPrinterFriendlyTextFragment() | 604 | // drawTextFragment() or drawPrinterFriendlyTextFragment() | ||
604 | // to draw the fragments | 605 | // to draw the fragments | ||
605 | void drawContents(QPainter &painter, const QRect &rect); | 606 | void drawContents(QPainter &painter, const QRect &rect); | ||
606 | // draw a transparent rectangle over the line of the current match | 607 | // draw a transparent rectangle over the line of the current match | ||
607 | void drawCurrentResultRect(QPainter &painter); | 608 | void drawCurrentResultRect(QPainter &painter); | ||
609 | // draw a tranparent rectangle over the lines that have been scrolled in | ||||
610 | void highlightScrolledLinesRect(QPainter& painter); | ||||
608 | // draws a section of text, all the text in this section | 611 | // draws a section of text, all the text in this section | ||
609 | // has a common color and style | 612 | // has a common color and style | ||
610 | void drawTextFragment(QPainter &painter, const QRect &rect, const QString &text, | 613 | void drawTextFragment(QPainter &painter, const QRect &rect, const QString &text, | ||
611 | const Character *style); | 614 | const Character *style); | ||
612 | 615 | | |||
613 | void drawPrinterFriendlyTextFragment(QPainter &painter, const QRect &rect, const QString &text, | 616 | void drawPrinterFriendlyTextFragment(QPainter &painter, const QRect &rect, const QString &text, | ||
614 | const Character *style); | 617 | const Character *style); | ||
615 | // draws the background for a text fragment | 618 | // draws the background for a text fragment | ||
▲ Show 20 Lines • Show All 226 Lines • ▼ Show 20 Line(s) | |||||
842 | qreal _opacity; | 845 | qreal _opacity; | ||
843 | 846 | | |||
844 | bool _dimWhenInactive; | 847 | bool _dimWhenInactive; | ||
845 | 848 | | |||
846 | ScrollState _scrollWheelState; | 849 | ScrollState _scrollWheelState; | ||
847 | IncrementalSearchBar *_searchBar; | 850 | IncrementalSearchBar *_searchBar; | ||
848 | 851 | | |||
849 | QRect _searchResultRect; | 852 | QRect _searchResultRect; | ||
853 | | ||||
854 | bool _highlightScrolledLines; | ||||
855 | bool _needToHighlightLines; | ||||
856 | QRect _highlightScrolledLinesRect; | ||||
857 | int _previousScrollCount; | ||||
858 | | ||||
850 | friend class TerminalDisplayAccessible; | 859 | friend class TerminalDisplayAccessible; | ||
851 | }; | 860 | }; | ||
852 | 861 | | |||
853 | class AutoScrollHandler : public QObject | 862 | class AutoScrollHandler : public QObject | ||
854 | { | 863 | { | ||
855 | Q_OBJECT | 864 | Q_OBJECT | ||
856 | 865 | | |||
857 | public: | 866 | public: | ||
Show All 15 Lines |