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

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

?? editor.cxx

?? porting scintilla to qt
?? CXX
?? 第 1 頁 / 共 2 頁
字號:
// Scintilla source code edit control/** @file Editor.cxx ** Main code for the edit control. **/// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>// The License.txt file describes the conditions under which this software may be distributed.#include <stdlib.h>#include <string.h>#include <stdio.h>#include <ctype.h>#include "Platform.h"#ifndef PLAT_QT#define INCLUDE_DEPRECATED_FEATURES#endif#include "Scintilla.h"#include "SplitVector.h"#include "Partitioning.h"#include "RunStyles.h"#include "ContractionState.h"#include "CellBuffer.h"#include "KeyMap.h"#include "Indicator.h"#include "XPM.h"#include "LineMarker.h"#include "Style.h"#include "ViewStyle.h"#include "CharClassify.h"#include "Decoration.h"#include "Document.h"#include "PositionCache.h"#include "Editor.h"#ifdef SCI_NAMESPACEusing namespace Scintilla;#endif/*	return whether this modification represents an operation that	may reasonably be deferred (not done now OR [possibly] at all)*/static bool CanDeferToLastStep(const DocModification& mh) {	if (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE))		return true;	// CAN skip	if (!(mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO)))		return false;	// MUST do	if (mh.modificationType & SC_MULTISTEPUNDOREDO)		return true;	// CAN skip	return false;		// PRESUMABLY must do}static bool CanEliminate(const DocModification& mh) {	return	    (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) != 0;}/*	return whether this modification represents the FINAL step	in a [possibly lengthy] multi-step Undo/Redo sequence*/static bool IsLastStep(const DocModification& mh) {	return	    (mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO)) != 0	    && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0	    && (mh.modificationType & SC_LASTSTEPINUNDOREDO) != 0	    && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0;}Caret::Caret() :		active(false), on(false), period(500) {}Timer::Timer() :		ticking(false), ticksToWait(0), tickerID(0) {}Idler::Idler() :		state(false), idlerID(0) {}static inline bool IsControlCharacter(int ch) {	// iscntrl returns true for lots of chars > 127 which are displayable	return ch >= 0 && ch < ' ';}Editor::Editor() {	ctrlID = 0;	stylesValid = false;	printMagnification = 0;	printColourMode = SC_PRINT_NORMAL;	printWrapState = eWrapWord;	cursorMode = SC_CURSORNORMAL;	controlCharSymbol = 0;	/* Draw the control characters */	hasFocus = false;	hideSelection = false;	inOverstrike = false;	errorStatus = 0;	mouseDownCaptures = true;	bufferedDraw = true;	twoPhaseDraw = true;	lastClickTime = 0;	dwellDelay = SC_TIME_FOREVER;	ticksToDwell = SC_TIME_FOREVER;	dwelling = false;	ptMouseLast.x = 0;	ptMouseLast.y = 0;	inDragDrop = ddNone;	dropWentOutside = false;	posDrag = invalidPosition;	posDrop = invalidPosition;	selectionType = selChar;	lastXChosen = 0;	lineAnchor = 0;	originalAnchorPos = 0;	selType = selStream;	moveExtendsSelection = false;	xStartSelect = 0;	xEndSelect = 0;	primarySelection = true;	caretXPolicy = CARET_SLOP | CARET_EVEN;	caretXSlop = 50;	caretYPolicy = CARET_EVEN;	caretYSlop = 0;	searchAnchor = 0;	xOffset = 0;	xCaretMargin = 50;	horizontalScrollBarVisible = true;	scrollWidth = 2000;	trackLineWidth = false;	lineWidthMaxSeen = 0;	verticalScrollBarVisible = true;	endAtLastLine = true;	caretSticky = false;	pixmapLine = Surface::Allocate();	pixmapSelMargin = Surface::Allocate();	pixmapSelPattern = Surface::Allocate();	pixmapIndentGuide = Surface::Allocate();	pixmapIndentGuideHighlight = Surface::Allocate();	currentPos = 0;	anchor = 0;	targetStart = 0;	targetEnd = 0;	searchFlags = 0;	topLine = 0;	posTopLine = 0;	lengthForEncode = -1;	needUpdateUI = true;	braces[0] = invalidPosition;	braces[1] = invalidPosition;	bracesMatchStyle = STYLE_BRACEBAD;	highlightGuideColumn = 0;	theEdge = 0;	paintState = notPainting;	modEventMask = SC_MODEVENTMASKALL;	pdoc = new Document();	pdoc->AddRef();	pdoc->AddWatcher(this, 0);	recordingMacro = false;	foldFlags = 0;	wrapState = eWrapNone;	wrapWidth = LineLayout::wrapWidthInfinite;	wrapStart = wrapLineLarge;	wrapEnd = wrapLineLarge;	wrapVisualFlags = 0;	wrapVisualFlagsLocation = 0;	wrapVisualStartIndent = 0;	actualWrapVisualStartIndent = 0;	convertPastes = true;	hsStart = -1;	hsEnd = -1;	llc.SetLevel(LineLayoutCache::llcCaret);	posCache.SetSize(0x400);}Editor::~Editor() {	pdoc->RemoveWatcher(this, 0);	pdoc->Release();	pdoc = 0;	DropGraphics();	delete pixmapLine;	delete pixmapSelMargin;	delete pixmapSelPattern;	delete pixmapIndentGuide;	delete pixmapIndentGuideHighlight;}void Editor::Finalise() {	SetIdle(false);	CancelModes();}void Editor::DropGraphics() {	pixmapLine->Release();	pixmapSelMargin->Release();	pixmapSelPattern->Release();	pixmapIndentGuide->Release();	pixmapIndentGuideHighlight->Release();}void Editor::InvalidateStyleData() {	stylesValid = false;	DropGraphics();	palette.Release();	llc.Invalidate(LineLayout::llInvalid);	posCache.Clear();	if (selType == selRectangle) {		xStartSelect = XFromPosition(anchor);		xEndSelect = XFromPosition(currentPos);	}}void Editor::InvalidateStyleRedraw() {	NeedWrapping();	InvalidateStyleData();	Redraw();}void Editor::RefreshColourPalette(Palette &pal, bool want) {	vs.RefreshColourPalette(pal, want);}void Editor::RefreshStyleData() {	if (!stylesValid) {		stylesValid = true;		AutoSurface surface(this);		if (surface) {			vs.Refresh(*surface);			RefreshColourPalette(palette, true);			palette.Allocate(wMain);			RefreshColourPalette(palette, false);		}		SetScrollBars();	}}PRectangle Editor::GetClientRectangle() {	return wMain.GetClientPosition();}PRectangle Editor::GetTextRectangle() {	PRectangle rc = GetClientRectangle();	rc.left += vs.fixedColumnWidth;	rc.right -= vs.rightMarginWidth;	return rc;}int Editor::LinesOnScreen() {	PRectangle rcClient = GetClientRectangle();	int htClient = rcClient.bottom - rcClient.top;	//Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1);	return htClient / vs.lineHeight;}int Editor::LinesToScroll() {	int retVal = LinesOnScreen() - 1;	if (retVal < 1)		return 1;	else		return retVal;}int Editor::MaxScrollPos() {	//Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n",	//LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1);	int retVal = cs.LinesDisplayed();	if (endAtLastLine) {		retVal -= LinesOnScreen();	} else {		retVal--;	}	if (retVal < 0) {		return 0;	} else {		return retVal;	}}const char *ControlCharacterString(unsigned char ch) {	const char *reps[] = {		"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",		"BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI",		"DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB",		"CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US"	};	if (ch < (sizeof(reps) / sizeof(reps[0]))) {		return reps[ch];	} else {		return "BAD";	}}/** * Convenience class to ensure LineLayout objects are always disposed. */class AutoLineLayout {	LineLayoutCache &llc;	LineLayout *ll;	AutoLineLayout &operator=(const AutoLineLayout &) { return * this; }public:	AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {}	~AutoLineLayout() {		llc.Dispose(ll);		ll = 0;	}	LineLayout *operator->() const {		return ll;	}	operator LineLayout *() const {		return ll;	}	void Set(LineLayout *ll_) {		llc.Dispose(ll);		ll = ll_;	}};#ifdef SCI_NAMESPACEnamespace Scintilla {#endif/** * Allows to iterate through the lines of a selection. * Althought it can be called for a stream selection, in most cases * it is inefficient and it should be used only for * a rectangular or a line selection. */class SelectionLineIterator {private:	Editor *ed;	int line;	///< Current line within the iteration.	bool forward;	///< True if iterating by increasing line number, false otherwise.	int selStart, selEnd;	///< Positions of the start and end of the selection relative to the start of the document.	int minX, maxX;	///< Left and right of selection rectangle.public:	int lineStart, lineEnd;	///< Line numbers, first and last lines of the selection.	int startPos, endPos;	///< Positions of the beginning and end of the selection on the current line.	void Reset() {		if (forward) {			line = lineStart;		} else {			line = lineEnd;		}	}	SelectionLineIterator(Editor *ed_, bool forward_ = true) : line(0), startPos(0), endPos(0) {		ed = ed_;		forward = forward_;		selStart = ed->SelectionStart();		selEnd = ed->SelectionEnd();		lineStart = ed->pdoc->LineFromPosition(selStart);		lineEnd = ed->pdoc->LineFromPosition(selEnd);		// Left of rectangle		minX = Platform::Minimum(ed->xStartSelect, ed->xEndSelect);		// Right of rectangle		maxX = Platform::Maximum(ed->xStartSelect, ed->xEndSelect);		Reset();	}	~SelectionLineIterator() {}	void SetAt(int line) {		if (line < lineStart || line > lineEnd) {			startPos = endPos = INVALID_POSITION;		} else {			if (ed->selType == ed->selRectangle) {				// Measure line and return character closest to minX				startPos = ed->PositionFromLineX(line, minX);				// Measure line and return character closest to maxX				endPos = ed->PositionFromLineX(line, maxX);			} else if (ed->selType == ed->selLines) {				startPos = ed->pdoc->LineStart(line);				endPos = ed->pdoc->LineStart(line + 1);			} else {	// Stream selection, here only for completion				if (line == lineStart) {					startPos = selStart;				} else {					startPos = ed->pdoc->LineStart(line);				}				if (line == lineEnd) {					endPos = selEnd;				} else {					endPos = ed->pdoc->LineStart(line + 1);				}			}		}	}	bool Iterate() {		SetAt(line);		if (forward) {			line++;		} else {			line--;		}		return startPos != INVALID_POSITION;	}};#ifdef SCI_NAMESPACE}#endifPoint Editor::LocationFromPosition(int pos) {	Point pt;	RefreshStyleData();	if (pos == INVALID_POSITION)		return pt;	int line = pdoc->LineFromPosition(pos);	int lineVisible = cs.DisplayFromDoc(line);	//Platform::DebugPrintf("line=%d\n", line);	AutoSurface surface(this);	AutoLineLayout ll(llc, RetrieveLineLayout(line));	if (surface && ll) {		// -1 because of adding in for visible lines in following loop.		pt.y = (lineVisible - topLine - 1) * vs.lineHeight;		pt.x = 0;		unsigned int posLineStart = pdoc->LineStart(line);		LayoutLine(line, surface, vs, ll, wrapWidth);		int posInLine = pos - posLineStart;		// In case of very long line put x at arbitrary large position		if (posInLine > ll->maxLineLength) {			pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)];		}		for (int subLine = 0; subLine < ll->lines; subLine++) {			if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) {				pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)];				if (actualWrapVisualStartIndent != 0) {					int lineStart = ll->LineStart(subLine);					if (lineStart != 0)	// Wrapped						pt.x += actualWrapVisualStartIndent * vs.aveCharWidth;				}			}			if (posInLine >= ll->LineStart(subLine)) {				pt.y += vs.lineHeight;			}		}		pt.x += vs.fixedColumnWidth - xOffset;	}	return pt;}int Editor::XFromPosition(int pos) {	Point pt = LocationFromPosition(pos);	return pt.x - vs.fixedColumnWidth + xOffset;}int Editor::LineFromLocation(Point pt) {	return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine);}void Editor::SetTopLine(int topLineNew) {	topLine = topLineNew;	posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine));}int Editor::PositionFromLocation(Point pt) {	RefreshStyleData();	pt.x = pt.x - vs.fixedColumnWidth + xOffset;	int visibleLine = pt.y / vs.lineHeight + topLine;	if (pt.y < 0) {	// Division rounds towards 0		visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine;	}	if (visibleLine < 0)		visibleLine = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黄人亚洲片| 日本欧美肥老太交大片| 国产午夜精品久久久久久免费视| 91精品国产麻豆国产自产在线 | 欧美丝袜丝交足nylons| 欧美日韩在线综合| 日韩一区二区在线看| 日韩精品一区二区三区视频 | 久久精品国产亚洲高清剧情介绍| 亚洲电影第三页| 捆绑变态av一区二区三区| 久久成人羞羞网站| 成人免费av资源| 欧美综合在线视频| 欧美大片拔萝卜| 久久蜜桃香蕉精品一区二区三区| 国产精品久久久久一区| 日韩精品欧美精品| eeuss国产一区二区三区| 欧美精品一二三四| 国产精品久久久久久久久图文区| 亚洲国产精品久久久男人的天堂| 激情六月婷婷综合| 欧美理论电影在线| 中文字幕永久在线不卡| 精彩视频一区二区| 日韩欧美在线网站| 亚洲一区二区在线视频| 国产精品69久久久久水密桃| 一本色道亚洲精品aⅴ| 久久久久久久性| 国产资源在线一区| 精品国产污污免费网站入口| 日本伊人精品一区二区三区观看方式| 精品一区二区免费视频| 91麻豆精品国产91久久久更新时间 | 日本精品裸体写真集在线观看| 久久久精品综合| 国产精品一品二品| 久久久精品蜜桃| 国产精品一区二区果冻传媒| 国产亚洲精品7777| 丰满亚洲少妇av| 18欧美乱大交hd1984| 日本二三区不卡| 亚洲国产欧美一区二区三区丁香婷| 91麻豆免费视频| 丝袜诱惑制服诱惑色一区在线观看| 欧美日韩国产影片| 天堂午夜影视日韩欧美一区二区| 欧美亚洲综合在线| 日韩国产精品大片| 国产情人综合久久777777| jizz一区二区| 日韩激情视频在线观看| 精品国产免费视频| 91久久线看在观草草青青| 亚洲电影一区二区| 久久精品日产第一区二区三区高清版 | 成人亚洲一区二区一| 欧美一区二区精品久久911| 成人欧美一区二区三区| 成人精品国产免费网站| 无码av中文一区二区三区桃花岛| 日韩欧美国产三级电影视频| 亚洲视频一区在线观看| 欧美四级电影在线观看| 国模无码大尺度一区二区三区| 亚洲少妇30p| 国产欧美日韩亚州综合| 99国产欧美另类久久久精品| 日韩电影一区二区三区| 亚洲欧洲色图综合| 在线日韩一区二区| 99久久精品免费看国产免费软件| 日韩av网站免费在线| 亚洲精品乱码久久久久久黑人 | 久久久久国色av免费看影院| 欧美精品vⅰdeose4hd| 欧美在线免费观看亚洲| 91小宝寻花一区二区三区| 国产精品1区二区.| 国产成人自拍网| 丰满放荡岳乱妇91ww| 国产精品亚洲人在线观看| 九九九精品视频| 国产精品夜夜爽| 粉嫩嫩av羞羞动漫久久久| 国产一区二区电影| 国产成人免费在线视频| 白白色亚洲国产精品| 色综合久久88色综合天天| 欧美无乱码久久久免费午夜一区| 日本韩国精品在线| 69堂亚洲精品首页| 精品国免费一区二区三区| 久久蜜桃一区二区| 一区二区三区四区国产精品| 亚洲一区中文日韩| 激情六月婷婷久久| 99久久久精品| 精品日产卡一卡二卡麻豆| 国产精品传媒在线| 日本在线不卡一区| 久久国产精品露脸对白| 国产成人午夜片在线观看高清观看| 成人夜色视频网站在线观看| 欧美日韩在线综合| 欧美韩国一区二区| 免费观看在线色综合| 99久久精品国产导航| 国产精品视频在线看| 亚洲成人精品一区| 日韩精品一二区| 亚洲国产日韩a在线播放性色| 欧美精品一区二区三| 精品嫩草影院久久| 91精品国产色综合久久不卡电影| 久久久美女毛片| 日韩av不卡一区二区| 欧美视频在线一区二区三区 | 污片在线观看一区二区| 成人免费的视频| 精品国免费一区二区三区| 亚洲一区二区三区激情| 91同城在线观看| 国产精品污www在线观看| 国产麻豆精品视频| 久久久亚洲精品石原莉奈 | 91啪亚洲精品| 亚洲嫩草精品久久| 色综合久久综合| 亚洲高清不卡在线观看| 精品视频在线免费观看| 一区二区久久久久| 欧美一区二区视频网站| 日本怡春院一区二区| 日韩精品一区二区三区中文精品 | 99久久精品国产毛片| 中文字幕+乱码+中文字幕一区| 成人免费高清在线| 亚洲精品高清在线| 日韩午夜在线影院| 成人综合在线网站| 亚洲高清三级视频| 国产亚洲精品资源在线26u| 99re免费视频精品全部| 国产日韩av一区二区| 99国产麻豆精品| 日本午夜一区二区| 亚洲日本va午夜在线影院| 3d成人h动漫网站入口| 懂色av一区二区三区免费看| 亚洲最新视频在线观看| 久久久噜噜噜久久中文字幕色伊伊| 欧美午夜理伦三级在线观看| 日韩精品国产精品| 中文字幕中文字幕在线一区 | 欧美日韩视频在线第一区| 99久久精品免费精品国产| 亚洲精品五月天| 欧美剧情电影在线观看完整版免费励志电影 | 色国产精品一区在线观看| 亚洲欧洲三级电影| 色婷婷精品大视频在线蜜桃视频| 奇米色777欧美一区二区| 中文字幕日韩一区| 久久日韩精品一区二区五区| 91精品国产综合久久久蜜臀图片| 91色.com| 91网站最新网址| 成人黄色小视频在线观看| 久久精品国产精品亚洲综合| 亚洲欧美经典视频| 最新国产成人在线观看| 亚洲人成影院在线观看| 中文字幕亚洲欧美在线不卡| 成人欧美一区二区三区黑人麻豆| 国产女人aaa级久久久级| 欧美一区二区三区在线观看| 4438x成人网最大色成网站| 日韩美女天天操| 欧美国产1区2区| 欧美韩国一区二区| 亚洲成人av一区二区| 蜜桃久久av一区| 精品在线播放免费| 91蜜桃视频在线| 欧美日韩国产免费一区二区| 91精品国产欧美一区二区18| 精品国产免费视频| 亚洲女子a中天字幕| 蜜臀va亚洲va欧美va天堂 | 精品一区二区影视| 99久久精品情趣| 欧美一卡二卡三卡| 亚洲图片激情小说| 精品一区二区在线播放| 成人午夜av影视| 欧美videofree性高清杂交|