"Fossies" - the Fresh Open Source Software Archive

Member "tdesktop-2.6.1/Telegram/SourceFiles/dialogs/dialogs_layout.h" (24 Feb 2021, 1846 Bytes) of package /linux/misc/tdesktop-2.6.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dialogs_layout.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 This file is part of Telegram Desktop,
    3 the official desktop application for the Telegram messaging service.
    4 
    5 For license and copyright information please follow this link:
    6 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
    7 */
    8 #pragma once
    9 
   10 namespace Dialogs {
   11 
   12 class Row;
   13 class FakeRow;
   14 class BasicRow;
   15 
   16 namespace Layout {
   17 
   18 const style::icon *ChatTypeIcon(
   19     not_null<PeerData*> peer,
   20     bool active,
   21     bool selected);
   22 //const style::icon *FeedTypeIcon( // #feed
   23 //  not_null<Data::Feed*> feed,
   24 //  bool active,
   25 //  bool selected);
   26 
   27 class RowPainter {
   28 public:
   29     static void paint(
   30         Painter &p,
   31         not_null<const Row*> row,
   32         FilterId filterId,
   33         int fullWidth,
   34         bool active,
   35         bool selected,
   36         crl::time ms);
   37     static void paint(
   38         Painter &p,
   39         not_null<const FakeRow*> row,
   40         int fullWidth,
   41         bool active,
   42         bool selected,
   43         crl::time ms,
   44         bool displayUnreadInfo);
   45     static QRect sendActionAnimationRect(
   46         int animationWidth,
   47         int animationHeight,
   48         int fullWidth,
   49         bool textUpdated);
   50 
   51 };
   52 
   53 void PaintCollapsedRow(
   54     Painter &p,
   55     const BasicRow &row,
   56     Data::Folder *folder,
   57     const QString &text,
   58     int unread,
   59     int fullWidth,
   60     bool selected);
   61 
   62 enum UnreadBadgeSize {
   63     UnreadBadgeInDialogs = 0,
   64     UnreadBadgeInHistoryToDown,
   65     UnreadBadgeInStickersPanel,
   66     UnreadBadgeInStickersBox,
   67     UnreadBadgeInTouchBar,
   68 
   69     UnreadBadgeSizesCount
   70 };
   71 struct UnreadBadgeStyle {
   72     UnreadBadgeStyle();
   73 
   74     style::align align = style::al_right;
   75     bool active = false;
   76     bool selected = false;
   77     bool muted = false;
   78     int textTop = 0;
   79     int size = 0;
   80     int padding = 0;
   81     UnreadBadgeSize sizeId = UnreadBadgeInDialogs;
   82     style::font font;
   83 };
   84 void paintUnreadCount(
   85     Painter &p,
   86     const QString &t,
   87     int x,
   88     int y,
   89     const UnreadBadgeStyle &st,
   90     int *outUnreadWidth = nullptr,
   91     int allowDigits = 0);
   92 
   93 void clearUnreadBadgesCache();
   94 
   95 } // namespace Layout
   96 } // namespace Dialogs