亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? render_line.h

?? It is WEB browser core module with source code. Very good!
?? H
字號:
/*
 * This file is part of the line box implementation for KDE.
 *
 * Copyright (C) 2003 Apple Computer, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 */
#ifndef RENDER_LINE_H
#define RENDER_LINE_H

#include "rendering/render_object.h"

namespace DOM {
class AtomicString;
};

namespace khtml {

class EllipsisBox;
class InlineFlowBox;
class RootInlineBox;
class RenderBlock;
class RenderFlow;

// InlineBox represents a rectangle that occurs on a line.  It corresponds to
// some RenderObject (i.e., it represents a portion of that RenderObject).
class InlineBox
OOM_MODIFIED
{
public:
    InlineBox(RenderObject* obj)
    :m_object(obj), m_x(0), m_y(0), m_width(0), m_height(0), m_baseline(0),
     m_firstLine(false), m_constructed(false), m_dirty(false), m_extracted(false)
    {
        m_next = 0;
        m_prev = 0;
        m_parent = 0;
    }

    virtual ~InlineBox() {};

    virtual void detach(RenderArena* renderArena);

    virtual void deleteLine(RenderArena* arena);
    virtual void extractLine();
    virtual void attachLine();

    virtual void adjustPosition(int dx, int dy);

    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
    virtual bool nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty);
    
    // Overloaded new operator.
    void* operator new(size_t sz, RenderArena* renderArena) throw();

    // Overridden to prevent the normal delete from being called.
    void operator delete(void* ptr, size_t sz);

private:
    // The normal operator new is disallowed.
    void* operator new(size_t sz) throw();
    
public:
    virtual bool isInlineBox() { return false; }
    virtual bool isInlineFlowBox() { return false; }
    virtual bool isContainer() { return false; }
    virtual bool isInlineTextBox() { return false; }
    virtual bool isRootInlineBox() { return false; }
    
    virtual bool isText() const { return false; }

    bool isConstructed() { return m_constructed; }
    virtual void setConstructed() {
        m_constructed = true;
        if (m_next)
            m_next->setConstructed();
    }
    void setExtracted(bool b = true) { m_extracted = b; }
    
    void setFirstLineStyleBit(bool f) { m_firstLine = f; }
    bool isFirstLineStyle() const { return m_firstLine; }

    void remove();

    InlineBox* nextOnLine() const { return m_next; }
    InlineBox* prevOnLine() const { return m_prev; }
    void setNextOnLine(InlineBox* next) { m_next = next; }
    void setPrevOnLine(InlineBox* prev) { m_prev = prev; }
    bool nextOnLineExists() const;
    bool prevOnLineExists() const;

    virtual InlineBox* firstLeafChild();
    virtual InlineBox* lastLeafChild();
    InlineBox* nextLeafChild();
    InlineBox* prevLeafChild();
        
    RenderObject* object() const { return m_object; }

    InlineFlowBox* parent() const { return m_parent; }
    void setParent(InlineFlowBox* par) { m_parent = par; }

    RootInlineBox* root();
    
    void setWidth(int w) { m_width = w; }
    int width() { return m_width; }

    void setXPos(int x) { m_x = x; }
    int xPos() { return m_x; }

    void setYPos(int y) { m_y = y; }
    int yPos() { return m_y; }

    void setHeight(int h) { m_height = h; }
    int height() { return m_height; }
    
    void setBaseline(int b) { m_baseline = b; }
    int baseline() { return m_baseline; }

    virtual bool hasTextChildren() { return true; }

    virtual int topOverflow() { return yPos(); }
    virtual int bottomOverflow() { return yPos()+height(); }
    virtual int leftOverflow() { return xPos(); }
    virtual int rightOverflow() { return xPos()+width(); }

    virtual long caretMinOffset() const;
    virtual long caretMaxOffset() const;
    virtual unsigned long caretMaxRenderedOffset() const;
    
    virtual void clearTruncation() {};

    bool isDirty() const { return m_dirty; }
    void markDirty(bool dirty=true) { m_dirty = dirty; }

    void dirtyLineBoxes();
    
    virtual RenderObject::SelectionState selectionState();

    virtual bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidth);
    virtual int placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth, bool&);

public: // FIXME: Would like to make this protected, but methods are accessing these
        // members over in the part.
    RenderObject* m_object;

    int m_x;
    int m_y;
    int m_width;
    int m_height;
    int m_baseline;
    
    bool m_firstLine : 1;
    bool m_constructed : 1;
    bool m_dirty : 1;
    bool m_extracted : 1;

    InlineBox* m_next; // The next element on the same line as us.
    InlineBox* m_prev; // The previous element on the same line as us.

    InlineFlowBox* m_parent; // The box that contains us.
};

class InlineRunBox : public InlineBox
{
public:
    InlineRunBox(RenderObject* obj)
    :InlineBox(obj)
    {
        m_prevLine = 0;
        m_nextLine = 0;
    }

    InlineRunBox* prevLineBox() const { return m_prevLine; }
    InlineRunBox* nextLineBox() const { return m_nextLine; }
    void setNextLineBox(InlineRunBox* n) { m_nextLine = n; }
    void setPreviousLineBox(InlineRunBox* p) { m_prevLine = p; }

    virtual void paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx, int _ty) {};
    virtual void paintDecorations(RenderObject::PaintInfo& i, int _tx, int _ty, bool paintedChildren = false) {};
    
protected:
    InlineRunBox* m_prevLine;  // The previous box that also uses our RenderObject
    InlineRunBox* m_nextLine;  // The next box that also uses our RenderObject
};

class InlineFlowBox : public InlineRunBox
{
public:
    InlineFlowBox(RenderObject* obj)
    :InlineRunBox(obj)
    {
        m_firstChild = 0;
        m_lastChild = 0;
        m_includeLeftEdge = m_includeRightEdge = false;
        m_hasTextChildren = false;
    }

    RenderFlow* flowObject();

    virtual bool isInlineFlowBox() { return true; }

    InlineFlowBox* prevFlowBox() const { return static_cast<InlineFlowBox*>(m_prevLine); }
    InlineFlowBox* nextFlowBox() const { return static_cast<InlineFlowBox*>(m_nextLine); }
    
    InlineBox* firstChild() { return m_firstChild; }
    InlineBox* lastChild() { return m_lastChild; }

    virtual InlineBox* firstLeafChild();
    virtual InlineBox* lastLeafChild();
    InlineBox* firstLeafChildAfterBox(InlineBox* start=0);
    InlineBox* lastLeafChildBeforeBox(InlineBox* start=0);
        
    virtual void setConstructed() {
        InlineBox::setConstructed();
        if (m_firstChild)
            m_firstChild->setConstructed();
    }
    void addToLine(InlineBox* child);

    virtual void deleteLine(RenderArena* arena);
    virtual void extractLine();
    virtual void attachLine();
    virtual void adjustPosition(int dx, int dy);

    virtual void clearTruncation();
    
    virtual void paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx, int _ty);
    void paintBackgrounds(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
                          int my, int mh, int _tx, int _ty, int w, int h);
    void paintBackground(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
                         int my, int mh, int _tx, int _ty, int w, int h);
    virtual void paintDecorations(RenderObject::PaintInfo& i, int _tx, int _ty, bool paintedChildren = false);
    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
    virtual bool nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty);

    int marginBorderPaddingLeft();
    int marginBorderPaddingRight();
    int marginLeft();
    int marginRight();
    int borderLeft() { if (includeLeftEdge()) return object()->borderLeft(); return 0; }
    int borderRight() { if (includeRightEdge()) return object()->borderRight(); return 0; }
    int paddingLeft() { if (includeLeftEdge()) return object()->paddingLeft(); return 0; }
    int paddingRight() { if (includeRightEdge()) return object()->paddingRight(); return 0; }
    
    bool includeLeftEdge() { return m_includeLeftEdge; }
    bool includeRightEdge() { return m_includeRightEdge; }
    void setEdges(bool includeLeft, bool includeRight) {
        m_includeLeftEdge = includeLeft;
        m_includeRightEdge = includeRight;
    }
    virtual bool hasTextChildren() { return m_hasTextChildren; }

    // Helper functions used during line construction and placement.
    void determineSpacingForFlowBoxes(bool lastLine, RenderObject* endObject);
    int getFlowSpacingWidth();
    bool onEndChain(RenderObject* endObject);
    int placeBoxesHorizontally(int x, int& leftPosition, int& rightPosition);
    void verticallyAlignBoxes(int& heightOfBlock);
    void computeLogicalBoxHeights(int& maxPositionTop, int& maxPositionBottom,
                                  int& maxAscent, int& maxDescent, bool strictMode);
    void adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent,
                                   int maxPositionTop, int maxPositionBottom);
    void placeBoxesVertically(int y, int maxHeight, int maxAscent, bool strictMode,
                              int& topPosition, int& bottomPosition);
    void shrinkBoxesWithNoTextChildren(int topPosition, int bottomPosition);
    
    virtual void setVerticalOverflowPositions(int top, int bottom) {}

    void removeChild(InlineBox* child);
    
    virtual RenderObject::SelectionState selectionState();

    virtual bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidth);
    virtual int placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth, bool&);

protected:
    InlineBox* m_firstChild;
    InlineBox* m_lastChild;
    bool m_includeLeftEdge : 1;
    bool m_includeRightEdge : 1;
    bool m_hasTextChildren : 1;
};

class RootInlineBox : public InlineFlowBox
{
public:
    RootInlineBox(RenderObject* obj)
    : InlineFlowBox(obj), m_topOverflow(0), m_bottomOverflow(0), m_leftOverflow(0), m_rightOverflow(0),
      m_lineBreakObj(0), m_lineBreakPos(0), 
      m_blockHeight(0), m_endsWithBreak(false), m_hasSelectedChildren(false), m_ellipsisBox(0)
    {}
    
    virtual void detach(RenderArena* renderArena);
    void detachEllipsisBox(RenderArena* renderArena);

    RootInlineBox* nextRootBox() { return static_cast<RootInlineBox*>(m_nextLine); }
    RootInlineBox* prevRootBox() { return static_cast<RootInlineBox*>(m_prevLine); }

    virtual void adjustPosition(int dx, int dy);
    
    virtual bool isRootInlineBox() { return true; }
    virtual int topOverflow() { return m_topOverflow; }
    virtual int bottomOverflow() { return m_bottomOverflow; }
    virtual int leftOverflow() { return m_leftOverflow; }
    virtual int rightOverflow() { return m_rightOverflow; }
    virtual void setVerticalOverflowPositions(int top, int bottom) { m_topOverflow = top; m_bottomOverflow = bottom; }
    void setHorizontalOverflowPositions(int left, int right) { m_leftOverflow = left; m_rightOverflow = right; }
    void setLineBreakInfo(RenderObject* obj, uint breakPos)
    { m_lineBreakObj = obj; m_lineBreakPos = breakPos; }
    void setLineBreakPos(int p) { m_lineBreakPos = p; }

    void setBlockHeight(int h) { m_blockHeight = h; }
    void setEndsWithBreak(bool b) { m_endsWithBreak = b; }
    
    int blockHeight() const { return m_blockHeight; }
    bool endsWithBreak() const { return m_endsWithBreak; }
    RenderObject* lineBreakObj() const { return m_lineBreakObj; }
    uint lineBreakPos() const { return m_lineBreakPos; }

    void childRemoved(InlineBox* box);

    bool canAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, int ellipsisWidth);
    void placeEllipsis(const DOM::AtomicString& ellipsisStr, bool ltr, int blockEdge, int ellipsisWidth, InlineBox* markupBox = 0);
    virtual int placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth, bool&);

    EllipsisBox* ellipsisBox() const { return m_ellipsisBox; }
    void paintEllipsisBox(RenderObject::PaintInfo& i, int _tx, int _ty) const;
    bool hitTestEllipsisBox(RenderObject::NodeInfo& info, int _x, int _y, int _tx, int _ty,
                            HitTestAction hitTestAction, bool inBox);
    
    virtual void clearTruncation();

    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
    virtual bool nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty);

    bool hasSelectedChildren() const { return m_hasSelectedChildren; }
    void setHasSelectedChildren(bool b);
    
    virtual RenderObject::SelectionState selectionState();
    InlineBox* firstSelectedBox();
    InlineBox* lastSelectedBox();
    
    GapRects fillLineSelectionGap(int selTop, int selHeight, RenderBlock* rootBlock, int blockX, int blockY, 
                                  int tx, int ty, const RenderObject::PaintInfo* i);
    
    RenderBlock* block() const;

    int selectionTop();
    int selectionHeight() { return kMax(0, m_bottomOverflow - selectionTop()); }
 
    InlineBox* closestLeafChildForXPos(int _x, int _tx);

protected:
    // Normally we are only as tall as the style on our block dictates, but we might have content
    // that spills out above the height of our font (e.g, a tall image), or something that extends further
    // below our line (e.g., a child whose font has a huge descent).
    int m_topOverflow;
    int m_bottomOverflow;
    int m_leftOverflow;
    int m_rightOverflow;

    // Where this line ended.  The exact object and the position within that object are stored so that
    // we can create a BidiIterator beginning just after the end of this line.
    RenderObject* m_lineBreakObj;
    uint m_lineBreakPos;
    
    // The height of the block at the end of this line.  This is where the next line starts.
    int m_blockHeight;
    
    // Whether the line ends with a <br>.
    bool m_endsWithBreak : 1;
    
    // Whether we have any children selected (this bit will also be set if the <br> that terminates our
    // line is selected).
    bool m_hasSelectedChildren : 1;

    // An inline text box that represents our text truncation string.
    EllipsisBox* m_ellipsisBox;
};

}; //namespace

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
水蜜桃久久夜色精品一区的特点| 一区二区三区在线观看国产| 欧美色网站导航| 91视频国产资源| 国产91露脸合集magnet| 国产一区二区成人久久免费影院| 美女视频免费一区| 国产一区二区三区免费播放| 久久精品国产秦先生| 老司机午夜精品| 国产精品自产自拍| av中文字幕不卡| 97国产一区二区| 欧美中文字幕不卡| 欧美久久免费观看| 中文字幕一区日韩精品欧美| 国产精品久久综合| 一区二区在线观看免费视频播放| 一二三四区精品视频| 午夜精品在线视频一区| 久久99精品视频| 成人av网址在线观看| 日本福利一区二区| 日韩免费高清电影| 中文字幕一区二区三区在线播放| 亚洲最色的网站| 精久久久久久久久久久| 91美女片黄在线观看| 欧美浪妇xxxx高跟鞋交| 久久精品一区二区三区四区| 综合久久国产九一剧情麻豆| 亚洲成人一区二区| 国产精品123区| 欧美日韩视频在线第一区| 日韩视频123| √…a在线天堂一区| 亚洲va国产天堂va久久en| 国产精品一区二区三区四区| 日本二三区不卡| 国产婷婷精品av在线| 亚洲国产va精品久久久不卡综合| 黄色日韩网站视频| 欧美理论在线播放| 国产精品亲子伦对白| 日本不卡免费在线视频| 95精品视频在线| 精品对白一区国产伦| 国产精品乱码妇女bbbb| 日韩二区三区四区| 色婷婷久久久综合中文字幕| 国产亚洲人成网站| 久久精品国产成人一区二区三区| 91免费小视频| 亚洲国产精品精华液2区45| 日日摸夜夜添夜夜添精品视频| 成人av网站免费| 精品嫩草影院久久| 日韩黄色免费网站| 欧美性大战久久久久久久蜜臀 | 色婷婷av一区二区三区之一色屋| 日韩视频免费观看高清完整版| 一区二区三区欧美久久| 成人伦理片在线| 欧美极品美女视频| 久久99久久99小草精品免视看| 欧美猛男男办公室激情| 亚洲午夜精品网| 在线一区二区观看| 亚洲黄色性网站| 91在线播放网址| 亚洲人成精品久久久久| 99久久99精品久久久久久| 久久一区二区视频| 国产精品综合网| 久久久久久久久久久久电影 | 91精品欧美综合在线观看最新 | 欧美精品一区二区三区一线天视频 | 91国内精品野花午夜精品| 中文字幕日韩一区| 色素色在线综合| 亚洲成人在线网站| 日韩一区二区三| 全部av―极品视觉盛宴亚洲| 欧美一二三在线| 国产精品亚洲第一区在线暖暖韩国 | 最新国产精品久久精品| 91丨九色丨尤物| 一区二区三区精品久久久| 在线观看日产精品| 婷婷成人激情在线网| 欧美tickling网站挠脚心| 国产一二三精品| 中文字幕在线一区免费| 色噜噜狠狠色综合中国| 无吗不卡中文字幕| 精品国产sm最大网站免费看| 高潮精品一区videoshd| 一级日本不卡的影视| 欧美一级免费大片| 国产99久久久国产精品免费看 | 日本道色综合久久| 午夜不卡在线视频| 久久综合九色综合久久久精品综合| 国产成人一区二区精品非洲| 一区二区三区视频在线看| 欧美久久久久久蜜桃| 风间由美中文字幕在线看视频国产欧美 | 国产资源精品在线观看| 亚洲精品中文在线影院| 欧美电影影音先锋| av亚洲精华国产精华精华| 亚洲影院久久精品| 亚洲精品在线三区| 在线亚洲人成电影网站色www| 麻豆极品一区二区三区| 亚洲日本丝袜连裤袜办公室| 91麻豆精品国产91久久久久久久久| 国产精品正在播放| 视频一区二区三区入口| 国产精品欧美久久久久无广告| 欧美日韩高清不卡| 成人免费毛片aaaaa**| 日韩国产欧美三级| 亚洲乱码国产乱码精品精小说 | 美国av一区二区| 一区二区三区在线免费播放| 国产视频一区在线观看| 884aa四虎影成人精品一区| 粉嫩13p一区二区三区| 日韩电影免费在线看| 亚洲天堂中文字幕| 国产日本欧美一区二区| 日韩午夜小视频| 欧美日韩美少妇| 在线免费视频一区二区| 9i看片成人免费高清| 国产精品一品视频| 蜜臀av在线播放一区二区三区| 一二三区精品福利视频| 亚洲精品亚洲人成人网在线播放| 久久久蜜臀国产一区二区| 日韩美女视频一区二区在线观看| 在线视频欧美精品| 在线免费视频一区二区| 色天使色偷偷av一区二区| av动漫一区二区| av中文一区二区三区| 成人午夜伦理影院| 丰满放荡岳乱妇91ww| 成人性生交大片免费| 丁香六月久久综合狠狠色| 国产乱码精品一区二区三区忘忧草 | 久久97超碰色| 激情综合色综合久久| 日韩av电影免费观看高清完整版在线观看| 亚洲另类一区二区| 亚洲va天堂va国产va久| 亚洲国产中文字幕在线视频综合| 日韩美女啊v在线免费观看| 中文字幕一区二区三| 亚洲少妇30p| 一区二区三区在线视频观看58| 亚洲老妇xxxxxx| 香蕉影视欧美成人| 欧美aaa在线| 国产乱码精品一区二区三区五月婷| 国产高清不卡二三区| eeuss国产一区二区三区| 91丨九色丨蝌蚪丨老版| 欧美日韩久久久久久| 91精品国产麻豆| 久久久99免费| 国产精品乱人伦| 亚洲成人午夜电影| 精品一区二区三区视频| 精品一区二区三区视频| av高清久久久| 777精品伊人久久久久大香线蕉| 精品国产露脸精彩对白| 日本一区二区成人| 午夜精品久久一牛影视| 国产自产2019最新不卡| 日本精品视频一区二区| 日韩精品一区二区三区中文精品| 国产亚洲欧美色| 亚洲午夜久久久久久久久久久| 国产福利一区二区| 91国产精品成人| 欧美videofree性高清杂交| 亚洲视频精选在线| 麻豆一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| 欧美日韩精品福利| 中文字幕在线不卡国产视频| 图片区日韩欧美亚洲| 成人精品视频.| 欧美r级在线观看| 午夜在线成人av| 成人黄色一级视频| 久久夜色精品国产欧美乱极品|