亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品 欧美精品| 日韩一级高清毛片| 欧美福利电影网| 国产精品丝袜一区| 三级久久三级久久久| 成人激情午夜影院| 日韩色视频在线观看| 亚洲女厕所小便bbb| 激情亚洲综合在线| 欧美日韩高清在线| 亚洲视频一区二区在线观看| 九九**精品视频免费播放| 在线观看日韩精品| 中文字幕免费在线观看视频一区| 午夜视频久久久久久| 色综合久久中文综合久久牛| 国产性色一区二区| 韩国精品久久久| 日韩欧美的一区二区| 亚洲一级电影视频| 9l国产精品久久久久麻豆| 欧美精品一区二区在线观看| 免费高清不卡av| 欧美精品色综合| 亚洲成人福利片| 色综合色狠狠综合色| 中文在线免费一区三区高中清不卡| 麻豆视频一区二区| 日韩无一区二区| 久久66热re国产| 精品av久久707| 国产专区欧美精品| 久久老女人爱爱| 国产成人综合精品三级| 久久精品在这里| 国产乱色国产精品免费视频| 久久天天做天天爱综合色| 国产一区福利在线| 国产日韩欧美a| 成人激情av网| 日韩美女精品在线| 色婷婷精品大在线视频| 亚洲一区二区精品视频| 欧美精品久久久久久久多人混战| 午夜日韩在线观看| 日韩三级中文字幕| 国产中文字幕精品| 亚洲国产精品激情在线观看| 91网站视频在线观看| 一区二区三区电影在线播| 欧美日韩在线播| 天天综合网 天天综合色| 欧美一级国产精品| 九色综合国产一区二区三区| 国产欧美va欧美不卡在线| 99久久国产综合精品色伊| 洋洋av久久久久久久一区| 91精品国产一区二区三区蜜臀| 久久国产夜色精品鲁鲁99| 久久久久国产精品麻豆| www.66久久| 天使萌一区二区三区免费观看| 日韩欧美中文字幕公布| 粉嫩一区二区三区性色av| 亚洲免费大片在线观看| 日韩亚洲欧美中文三级| 粉嫩蜜臀av国产精品网站| 夜夜操天天操亚洲| 2022国产精品视频| 91亚洲国产成人精品一区二区三| 一级日本不卡的影视| 精品少妇一区二区三区| a4yy欧美一区二区三区| 日韩精品一区第一页| 国产日韩一级二级三级| 欧美人牲a欧美精品| 国产精品 欧美精品| 亚洲韩国精品一区| 国产欧美综合在线观看第十页| 色88888久久久久久影院按摩| 免费高清不卡av| 亚洲精品写真福利| 久久精品一区蜜桃臀影院| 欧美日韩在线一区二区| 成人黄色片在线观看| 男女男精品视频网| 一区视频在线播放| 久久久久久一二三区| 欧美美女一区二区三区| www.亚洲精品| 国产一区二区日韩精品| 亚洲1区2区3区视频| 中文字幕一区二区三区在线不卡 | 国产成人免费xxxxxxxx| 亚洲h在线观看| 一区二区三区欧美激情| 国产亚洲欧美一区在线观看| 日韩一级二级三级精品视频| 欧美日韩在线三区| 欧美在线播放高清精品| 99久久免费国产| 本田岬高潮一区二区三区| 国产精品一区专区| 激情综合色播激情啊| 另类综合日韩欧美亚洲| 日韩av一二三| 青青草国产精品97视觉盛宴| 亚洲国产成人av好男人在线观看| 中文字幕一区二区三区不卡在线| 久久午夜羞羞影院免费观看| 久久综合五月天婷婷伊人| 日韩欧美激情在线| 欧美一级黄色片| 69久久夜色精品国产69蝌蚪网| 欧美性猛交一区二区三区精品| 91年精品国产| 日本精品免费观看高清观看| 91小视频在线免费看| 色婷婷综合久久久久中文 | 日韩毛片精品高清免费| 1区2区3区国产精品| 综合激情成人伊人| 亚洲黄网站在线观看| 亚洲午夜久久久久久久久久久| 亚洲精品成人天堂一二三| 国产精品狼人久久影院观看方式| 久久久综合九色合综国产精品| 国产午夜精品理论片a级大结局| 久久久久久久性| 中文文精品字幕一区二区| 成人欧美一区二区三区1314 | 午夜精品久久久久久久99水蜜桃 | 91精品国产综合久久久蜜臀图片| 欧美日韩1234| 日韩视频免费观看高清完整版 | 亚洲精品你懂的| 偷拍与自拍一区| 蜜臀av一区二区| 国产老妇另类xxxxx| www.av亚洲| 欧美日韩电影一区| 亚洲精品在线观| 亚洲欧洲制服丝袜| 日韩av一区二区三区四区| 国产成人在线视频免费播放| 99精品视频一区二区三区| 欧美无人高清视频在线观看| 精品日本一线二线三线不卡| 国产精品美女久久久久aⅴ国产馆| 亚洲免费观看在线观看| 日韩福利电影在线| 风间由美一区二区av101| 欧美探花视频资源| 国产欧美一区二区精品性| 樱花草国产18久久久久| 毛片av一区二区| 色婷婷综合五月| 国产三级欧美三级日产三级99| 亚洲一区二区三区四区五区中文| 韩国一区二区三区| 欧美日韩亚州综合| 国产精品视频免费| 日韩电影免费一区| 91一区在线观看| 精品精品国产高清a毛片牛牛 | 国产精品热久久久久夜色精品三区| 亚洲h精品动漫在线观看| 丁香六月综合激情| 欧美一二三四区在线| 亚洲一区二区三区中文字幕 | 欧美色爱综合网| 国产蜜臀av在线一区二区三区| 亚洲在线观看免费| 99久久精品情趣| 久久久国产一区二区三区四区小说 | 成人免费视频视频| 678五月天丁香亚洲综合网| 1区2区3区精品视频| 日本成人在线不卡视频| 91在线视频网址| 欧美日韩一区二区三区四区| 亚洲欧美一区二区在线观看| 麻豆成人91精品二区三区| 色天天综合久久久久综合片| 国产精品国产成人国产三级| 日本中文一区二区三区| 99精品欧美一区二区三区小说| 精品免费国产一区二区三区四区| 午夜精品成人在线视频| 丰满亚洲少妇av| 精品久久久三级丝袜| 日韩中文字幕不卡| 欧美在线一二三四区| 国产亚洲欧美日韩在线一区| 日本一不卡视频| 欧美熟乱第一页| 中文字幕一区二区三区不卡| 99久久婷婷国产综合精品| 国产精品不卡一区二区三区| 成人av片在线观看|