Day 3

  1. SlateCore\Public\Types\PaintArgs.h
/**
 * SWidget::OnPaint and SWidget::Paint use FPaintArgs as their
 * sole parameter in order to ease the burden of passing
 * through multiple fields.
 */
class SLATECORE_API FPaintArgs
{
public:
    FPaintArgs( const SWidget& Parent, FHittestGrid& InHittestGrid, FVector2D InWindowOffset, double InCurrentTime, float InDeltaTime );
    
    FORCEINLINE FPaintArgs WithNewParent(const SWidget* Parent) const
    {
        checkSlow(Parent);
        return WithNewParent(*Parent);
    }

    FORCEINLINE_DEBUGGABLE FPaintArgs WithNewParent(const SWidget& Parent) const
    {
        FPaintArgs Args = FPaintArgs(Parent, this->Grid, this->WindowOffset, this->CurrentTime, this->DeltaTime);
        Args.LastHittestIndex = this->LastHittestIndex;
        Args.LastRecordedVisibility = this->LastRecordedVisibility;
        Args.LayoutCache = this->LayoutCache;
        Args.ParentCacheNode = this->ParentCacheNode;
        Args.bIsCaching = this->bIsCaching;
        Args.bIsVolatilityPass = this->bIsVolatilityPass;

        return Args;
    }

    FPaintArgs EnableCaching(const TWeakPtr<ILayoutCache>& InLayoutCache, FCachedWidgetNode* InParentCacheNode, bool bEnableCaching, bool bEnableVolatility) const;
    FPaintArgs WithNewTime(double InCurrentTime, float InDeltaTime) const;
    FPaintArgs RecordHittestGeometry(const SWidget* Widget, const FGeometry& WidgetGeometry, int32 LayerId) const;
    FPaintArgs InsertCustomHitTestPath( TSharedRef<ICustomHitTestPath> CustomHitTestPath, int32 HitTestIndex ) const;

    FHittestGrid& GetGrid() const { return Grid; }
    int32 GetLastHitTestIndex() const { return LastHittestIndex; }
    EVisibility GetLastRecordedVisibility() const { return LastRecordedVisibility; }
    FVector2D GetWindowToDesktopTransform() const { return WindowOffset; }
    double GetCurrentTime() const { return CurrentTime; }
    float GetDeltaTime() const { return DeltaTime; }
    bool IsCaching() const { return bIsCaching; }
    bool IsVolatilityPass() const { return bIsVolatilityPass; }
    const TWeakPtr<ILayoutCache>& GetLayoutCache() const { return LayoutCache; }
    FCachedWidgetNode* GetParentCacheNode() const { return ParentCacheNode; }

private:
    const SWidget& ParentPtr;
    FHittestGrid& Grid;
    int32 LastHittestIndex;
    EVisibility LastRecordedVisibility;
    FVector2D WindowOffset;
    double CurrentTime;
    float DeltaTime;
    bool bIsCaching;
    bool bIsVolatilityPass;
    TWeakPtr<ILayoutCache> LayoutCache;
    FCachedWidgetNode* ParentCacheNode;
};

尚不理解該類的作用影所,需要后續(xù)調(diào)試渴语。

  1. SlateCore\Public\Textures\SlateIcon.h
/**
 * Struct used to represent an icon in Slate
 */
struct SLATECORE_API FSlateIcon
{
    /**
     * Default constructor (empty icon).
     */
    FSlateIcon( );

    /**
     * Creates and initializes a new icon from a style set and style name
     *
     * @param InStyleSetName The name of the style set the icon can be found in.
     * @param StyleName The name of the style for the icon (assumes there may also be a ".Small" variant)
     */
    FSlateIcon( const FName& InStyleSetName, const FName& InStyleName );

    /**
     * Creates and initializes a new icon from a style set and style name
     *
     * @param InStyleSetName The name of the style set the icon can be found in.
     * @param StyleName The name of the style for the icon
     * @param InSmallStyleName The name of the style for the small icon
     */
    FSlateIcon( const FName& InStyleSetName, const FName& InStyleName, const FName& InSmallStyleName );

public:
    
    /**
     * Compare 2 slate icons for equality
     */
    friend bool operator==(const FSlateIcon& A, const FSlateIcon& B)
    {
        return A.bIsSet == B.bIsSet && A.StyleSetName == B.StyleSetName && A.StyleName == B.StyleName && A.SmallStyleName == B.SmallStyleName;
    }

    /**
     * Compare 2 slate icons for inequality
     */
    friend bool operator!=(const FSlateIcon& A, const FSlateIcon& B)
    {
        return !(A == B);
    }

public:

    /**
     * Gets the resolved icon.
     *
     * @return Icon brush, or FStyleDefaults::GetNoBrush() if the icon wasn't found.
     * @see GetSmallIcon
     */
    const FSlateBrush* GetIcon( ) const;

    /**
     * Optionally gets the resolved icon, returning nullptr if it's not defined
     *
     * @return Icon brush, or nullptr if the icon wasn't found.
     */
    const FSlateBrush* GetOptionalIcon( ) const;

    /**
     * Gets the resolved small icon.
     *
     * @return Icon brush, or FStyleDefaults::GetNoBrush() if the icon wasn't found.
     * @see GetIcon
     */
    const FSlateBrush* GetSmallIcon( ) const;


    /**
     * Optionally gets the resolved small icon, returning nullptr if it's not defined
     *
     * @return Icon brush, or nullptr if the icon wasn't found.
     */
    const FSlateBrush* GetOptionalSmallIcon( ) const;

    /**
     * Gets the name of the style for the icon.
     *
     * @return Style name.
     * @see GetStyleName, GetStyleSet, GetStyleSetName
     */
    const FName& GetSmallStyleName( ) const
    {
        return SmallStyleName;
    }

    /**
     * Gets the name of the style for the icon.
     *
     * @return Style name.
     * @see GetSmallStyleName, GetStyleSet, GetStyleSetName
     */
    const FName& GetStyleName( ) const
    {
        return StyleName;
    }

    /**
     * Gets the resolved style set.
     *
     * @return Style set, or nullptr if the style set wasn't found.
     * @see GetSmallStyleName, GetStyleName, GetStyleSetName
     */
    const class ISlateStyle* GetStyleSet( ) const;

    /**
     * Gets the name of the style set the icon can be found in.
     *
     * @return Style name.
     * @see GetSmallStyleName, GetStyleName, GetStyleSet
     */
    const FName& GetStyleSetName( ) const
    {
        return StyleSetName;
    }

    /**
     * Checks whether the icon is set to something.
     *
     * @return true if the icon is set, false otherwise.
     */
    const bool IsSet( ) const
    {
        return bIsSet;
    }

private:

    // The name of the style set the icon can be found in.
    FName StyleSetName;

    // The name of the style for the icon.
    FName StyleName;

    // The name of the style for the small icon.
    FName SmallStyleName;

    // Whether this icon has been explicitly set-up.
    bool bIsSet;
};

問題列表:
a. FSlateBrush是什么,有何作用.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子菱父,更是在濱河造成了極大的恐慌,老刑警劉巖剑逃,帶你破解...
    沈念sama閱讀 219,270評(píng)論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件浙宜,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡蛹磺,警方通過查閱死者的電腦和手機(jī)粟瞬,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,489評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來萤捆,“玉大人裙品,你說我怎么就攤上這事∷谆颍” “怎么了市怎?”我有些...
    開封第一講書人閱讀 165,630評(píng)論 0 356
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)辛慰。 經(jīng)常有香客問我区匠,道長(zhǎng),這世上最難降的妖魔是什么帅腌? 我笑而不...
    開封第一講書人閱讀 58,906評(píng)論 1 295
  • 正文 為了忘掉前任驰弄,我火速辦了婚禮,結(jié)果婚禮上速客,老公的妹妹穿的比我還像新娘戚篙。我一直安慰自己,他們只是感情好挽封,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,928評(píng)論 6 392
  • 文/花漫 我一把揭開白布已球。 她就那樣靜靜地躺著,像睡著了一般辅愿。 火紅的嫁衣襯著肌膚如雪智亮。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,718評(píng)論 1 305
  • 那天点待,我揣著相機(jī)與錄音阔蛉,去河邊找鬼。 笑死癞埠,一個(gè)胖子當(dāng)著我的面吹牛状原,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播苗踪,決...
    沈念sama閱讀 40,442評(píng)論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼颠区,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了通铲?” 一聲冷哼從身側(cè)響起毕莱,我...
    開封第一講書人閱讀 39,345評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎颅夺,沒想到半個(gè)月后朋截,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,802評(píng)論 1 317
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡吧黄,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,984評(píng)論 3 337
  • 正文 我和宋清朗相戀三年部服,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片拗慨。...
    茶點(diǎn)故事閱讀 40,117評(píng)論 1 351
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡廓八,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出赵抢,到底是詐尸還是另有隱情瘫想,我是刑警寧澤,帶...
    沈念sama閱讀 35,810評(píng)論 5 346
  • 正文 年R本政府宣布昌讲,位于F島的核電站国夜,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏短绸。R本人自食惡果不足惜车吹,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,462評(píng)論 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望醋闭。 院中可真熱鬧窄驹,春花似錦、人聲如沸证逻。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,011評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至丈咐,卻和暖如春瑞眼,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背棵逊。 一陣腳步聲響...
    開封第一講書人閱讀 33,139評(píng)論 1 272
  • 我被黑心中介騙來泰國(guó)打工伤疙, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人辆影。 一個(gè)月前我還...
    沈念sama閱讀 48,377評(píng)論 3 373
  • 正文 我出身青樓徒像,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親蛙讥。 傳聞我的和親對(duì)象是個(gè)殘疾皇子锯蛀,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,060評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容

  • 81. □32 reward [r??w?:d] n.報(bào)酬;v.酬謝次慢;獎(jiǎng)賞 派生:rewarding adj.有報(bào)...
    dreamhappy2009閱讀 363評(píng)論 0 0
  • 學(xué)習(xí)地址 標(biāo)簽管理 標(biāo)簽tag是一個(gè)容易記住的有意義的名字谬墙,跟某個(gè)commit綁定在一起 創(chuàng)建標(biāo)簽$ git ta...
    fangmusan閱讀 168評(píng)論 0 0
  • 敏姐,室內(nèi)裝潢設(shè)計(jì)師经备、私人訂制服裝設(shè)計(jì)師拭抬、私人訂制發(fā)型師、形象設(shè)計(jì)師侵蒙,我之所以稱呼她這么多“師”造虎,是因?yàn)檫@個(gè)蕙質(zhì)蘭...
    張一弘閱讀 266評(píng)論 0 0
  • “聽過那么多大道理,卻還是過不好這一生"纷闺。 聽到這句話算凿,電影《后會(huì)無(wú)期》里面的女主角說這句話時(shí)候的神情,依稀浮現(xiàn)在...
    ACH思無(wú)邪閱讀 208評(píng)論 0 1