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

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

?? editor.cxx

?? 最強源代碼編輯控件
?? CXX
?? 第 1 頁 / 共 3 頁
字號:
			if (pt.x < (ll->positions[lineEnd] - subLineStart)) {
				return pdoc->MovePositionOutsideChar(lineEnd + posLineStart, 1);
			}
		}
	}

	return INVALID_POSITION;
}

/**
 * Find the document position corresponding to an x coordinate on a particular document line.
 * Ensure is between whole characters when document is in multi-byte or UTF-8 mode.
 */
int Editor::PositionFromLineX(int lineDoc, int x) {
	RefreshStyleData();
	if (lineDoc >= pdoc->LinesTotal())
		return pdoc->Length();
	//Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine);
	AutoSurface surface(this);
	AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
	int retVal = 0;
	if (surface && ll) {
		unsigned int posLineStart = pdoc->LineStart(lineDoc);
		LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
		retVal = ll->numCharsInLine + posLineStart;
		int subLine = 0;
		int lineStart = ll->LineStart(subLine);
		int lineEnd = ll->LineStart(subLine + 1);
		int subLineStart = ll->positions[lineStart];

		if (actualWrapVisualStartIndent != 0) {
			if (lineStart != 0)	// Wrapped
				x -= actualWrapVisualStartIndent * vs.aveCharWidth;
		}
		for (int i = lineStart; i < lineEnd; i++) {
			if (x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) ||
			        IsEOLChar(ll->chars[i])) {
				retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1);
				break;
			}
		}
	}
	return retVal;
}

/**
 * If painting then abandon the painting because a wider redraw is needed.
 * @return true if calling code should stop drawing.
 */
bool Editor::AbandonPaint() {
	if ((paintState == painting) && !paintingAllText) {
		paintState = paintAbandoned;
	}
	return paintState == paintAbandoned;
}

void Editor::RedrawRect(PRectangle rc) {
	//Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom);

	// Clip the redraw rectangle into the client area
	PRectangle rcClient = GetClientRectangle();
	if (rc.top < rcClient.top)
		rc.top = rcClient.top;
	if (rc.bottom > rcClient.bottom)
		rc.bottom = rcClient.bottom;
	if (rc.left < rcClient.left)
		rc.left = rcClient.left;
	if (rc.right > rcClient.right)
		rc.right = rcClient.right;

	if ((rc.bottom > rc.top) && (rc.right > rc.left)) {
		wMain.InvalidateRectangle(rc);
	}
}

void Editor::Redraw() {
	//Platform::DebugPrintf("Redraw all\n");
	PRectangle rcClient = GetClientRectangle();
	wMain.InvalidateRectangle(rcClient);
	//wMain.InvalidateAll();
}

void Editor::RedrawSelMargin(int line) {
	if (!AbandonPaint()) {
		if (vs.maskInLine) {
			Redraw();
		} else {
			PRectangle rcSelMargin = GetClientRectangle();
			rcSelMargin.right = vs.fixedColumnWidth;
			if (line != -1) {
				int position = pdoc->LineStart(line);
				PRectangle rcLine = RectangleFromRange(position, position);
				rcSelMargin.top = rcLine.top;
				rcSelMargin.bottom = rcLine.bottom;
			}
			wMain.InvalidateRectangle(rcSelMargin);
		}
	}
}

PRectangle Editor::RectangleFromRange(int start, int end) {
	int minPos = start;
	if (minPos > end)
		minPos = end;
	int maxPos = start;
	if (maxPos < end)
		maxPos = end;
	int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(minPos));
	int lineDocMax = pdoc->LineFromPosition(maxPos);
	int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1;
	PRectangle rcClient = GetTextRectangle();
	PRectangle rc;
	rc.left = vs.fixedColumnWidth;
	rc.top = (minLine - topLine) * vs.lineHeight;
	if (rc.top < 0)
		rc.top = 0;
	rc.right = rcClient.right;
	rc.bottom = (maxLine - topLine + 1) * vs.lineHeight;
	// Ensure PRectangle is within 16 bit space
	rc.top = Platform::Clamp(rc.top, -32000, 32000);
	rc.bottom = Platform::Clamp(rc.bottom, -32000, 32000);

	return rc;
}

void Editor::InvalidateRange(int start, int end) {
	RedrawRect(RectangleFromRange(start, end));
}

int Editor::CurrentPosition() {
	return currentPos;
}

bool Editor::SelectionEmpty() {
	return anchor == currentPos;
}

int Editor::SelectionStart() {
	return Platform::Minimum(currentPos, anchor);
}

int Editor::SelectionEnd() {
	return Platform::Maximum(currentPos, anchor);
}

void Editor::SetRectangularRange() {
	if (selType == selRectangle) {
		xStartSelect = XFromPosition(anchor);
		xEndSelect = XFromPosition(currentPos);
	}
}

void Editor::InvalidateSelection(int currentPos_, int anchor_) {
	int firstAffected = anchor;
	if (firstAffected > currentPos)
		firstAffected = currentPos;
	if (firstAffected > anchor_)
		firstAffected = anchor_;
	if (firstAffected > currentPos_)
		firstAffected = currentPos_;
	int lastAffected = anchor;
	if (lastAffected < currentPos)
		lastAffected = currentPos;
	if (lastAffected < anchor_)
		lastAffected = anchor_;
	if (lastAffected < (currentPos_ + 1))	// +1 ensures caret repainted
		lastAffected = (currentPos_ + 1);
	needUpdateUI = true;
	InvalidateRange(firstAffected, lastAffected);
}

void Editor::SetSelection(int currentPos_, int anchor_) {
	currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_);
	anchor_ = pdoc->ClampPositionIntoDocument(anchor_);
	if ((currentPos != currentPos_) || (anchor != anchor_)) {
		InvalidateSelection(currentPos_, anchor_);
		currentPos = currentPos_;
		anchor = anchor_;
	}
	SetRectangularRange();
	ClaimSelection();
}

void Editor::SetSelection(int currentPos_) {
	currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_);
	if (currentPos != currentPos_) {
		InvalidateSelection(currentPos_, currentPos_);
		currentPos = currentPos_;
	}
	SetRectangularRange();
	ClaimSelection();
}

void Editor::SetEmptySelection(int currentPos_) {
	selType = selStream;
	moveExtendsSelection = false;
	SetSelection(currentPos_, currentPos_);
}

bool Editor::RangeContainsProtected(int start, int end) const {
	if (vs.ProtectionActive()) {
		if (start > end) {
			int t = start;
			start = end;
			end = t;
		}
		int mask = pdoc->stylingBitsMask;
		for (int pos = start; pos < end; pos++) {
			if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected())
				return true;
		}
	}
	return false;
}

bool Editor::SelectionContainsProtected() {
	// DONE, but untested...: make support rectangular selection
	bool scp = false;
	if (selType == selStream) {
		scp = RangeContainsProtected(anchor, currentPos);
	} else {
		SelectionLineIterator lineIterator(this);
		while (lineIterator.Iterate()) {
			if (RangeContainsProtected(lineIterator.startPos, lineIterator.endPos)) {
				scp = true;
				break;
			}
		}
	}
	return scp;
}

/**
 * Asks document to find a good position and then moves out of any invisible positions.
 */
int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) {
	pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd);
	if (vs.ProtectionActive()) {
		int mask = pdoc->stylingBitsMask;
		if (moveDir > 0) {
			if ((pos > 0) && vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()) {
				while ((pos < pdoc->Length()) &&
				        (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()))
					pos++;
			}
		} else if (moveDir < 0) {
			if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) {
				while ((pos > 0) &&
				        (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()))
					pos--;
			}
		}
	}
	return pos;
}

int Editor::MovePositionTo(int newPos, selTypes sel, bool ensureVisible) {
	int delta = newPos - currentPos;
	newPos = pdoc->ClampPositionIntoDocument(newPos);
	newPos = MovePositionOutsideChar(newPos, delta);
	if (sel != noSel) {
		selType = sel;
	}
	if (sel != noSel || moveExtendsSelection) {
		SetSelection(newPos);
	} else {
		SetEmptySelection(newPos);
	}
	ShowCaretAtCurrentPosition();
	if (ensureVisible) {
		EnsureCaretVisible();
	}
	NotifyMove(newPos);
	return 0;
}

int Editor::MovePositionSoVisible(int pos, int moveDir) {
	pos = pdoc->ClampPositionIntoDocument(pos);
	pos = MovePositionOutsideChar(pos, moveDir);
	int lineDoc = pdoc->LineFromPosition(pos);
	if (cs.GetVisible(lineDoc)) {
		return pos;
	} else {
		int lineDisplay = cs.DisplayFromDoc(lineDoc);
		if (moveDir > 0) {
			// lineDisplay is already line before fold as lines in fold use display line of line after fold
			lineDisplay = Platform::Clamp(lineDisplay, 0, cs.LinesDisplayed());
			return pdoc->LineStart(cs.DocFromDisplay(lineDisplay));
		} else {
			lineDisplay = Platform::Clamp(lineDisplay - 1, 0, cs.LinesDisplayed());
			return pdoc->LineEnd(cs.DocFromDisplay(lineDisplay));
		}
	}
}

/**
 * Choose the x position that the caret will try to stick to
 * as it moves up and down.
 */
void Editor::SetLastXChosen() {
	Point pt = LocationFromPosition(currentPos);
	lastXChosen = pt.x;
}

void Editor::ScrollTo(int line, bool moveThumb) {
	int topLineNew = Platform::Clamp(line, 0, MaxScrollPos());
	if (topLineNew != topLine) {
		// Try to optimise small scrolls
		int linesToMove = topLine - topLineNew;
		SetTopLine(topLineNew);
		ShowCaretAtCurrentPosition();
		// Perform redraw rather than scroll if many lines would be redrawn anyway.
#ifndef UNDER_CE
		if (abs(linesToMove) <= 10) {
			ScrollText(linesToMove);
		} else {
			Redraw();
		}
#else
		Redraw();
#endif
		if (moveThumb) {
			SetVerticalScrollPos();
		}
	}
}

void Editor::ScrollText(int /* linesToMove */) {
	//Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove);
	Redraw();
}

void Editor::HorizontalScrollTo(int xPos) {
	//Platform::DebugPrintf("HorizontalScroll %d\n", xPos);
	if (xPos < 0)
		xPos = 0;
	if ((wrapState == eWrapNone) && (xOffset != xPos)) {
		xOffset = xPos;
		SetHorizontalScrollPos();
		RedrawRect(GetClientRectangle());
	}
}

void Editor::MoveCaretInsideView(bool ensureVisible) {
	PRectangle rcClient = GetTextRectangle();
	Point pt = LocationFromPosition(currentPos);
	if (pt.y < rcClient.top) {
		MovePositionTo(PositionFromLocation(
		                   Point(lastXChosen, rcClient.top)),
		               noSel, ensureVisible);
	} else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) {
		int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight;
		MovePositionTo(PositionFromLocation(
		                   Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed)),
		               noSel, ensureVisible);
	}
}

int Editor::DisplayFromPosition(int pos) {
	int lineDoc = pdoc->LineFromPosition(pos);
	int lineDisplay = cs.DisplayFromDoc(lineDoc);
	AutoSurface surface(this);
	AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
	if (surface && ll) {
		LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
		unsigned int posLineStart = pdoc->LineStart(lineDoc);
		int posInLine = pos - posLineStart;
		lineDisplay--; // To make up for first increment ahead.
		for (int subLine = 0; subLine < ll->lines; subLine++) {
			if (posInLine >= ll->LineStart(subLine)) {
				lineDisplay++;
			}
		}
	}
	return lineDisplay;
}

/**
 * Ensure the caret is reasonably visible in context.
 *
Caret policy in SciTE

If slop is set, we can define a slop value.
This value defines an unwanted zone (UZ) where the caret is... unwanted.
This zone is defined as a number of pixels near the vertical margins,
and as a number of lines near the horizontal margins.
By keeping the caret away from the edges, it is seen within its context,
so it is likely that the identifier that the caret is on can be completely seen,
and that the current line is seen with some of the lines following it which are
often dependent on that line.

If strict is set, the policy is enforced... strictly.
The caret is centred on the display if slop is not set,
and cannot go in the UZ if slop is set.

If jumps is set, the display is moved more energetically
so the caret can move in the same direction longer before the policy is applied again.
'3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin.

If even is not set, instead of having symmetrical UZs,
the left and bottom UZs are extended up to right and top UZs respectively.
This way, we favour the displaying of useful information: the begining of lines,
where most code reside, and the lines after the caret, eg. the body of a function.

     |        |       |      |                                            |
slop | strict | jumps | even | Caret can go to the margin                 | When reaching limit

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线不卡一区二区| 精品国产网站在线观看| 欧美一区二区三区免费大片| 国产精品丝袜在线| 麻豆精品蜜桃视频网站| 欧洲一区二区三区在线| 中文字幕av一区二区三区免费看| 五月天激情小说综合| 99精品视频一区| 久久蜜桃香蕉精品一区二区三区| 午夜日韩在线电影| 91免费国产在线观看| 国产日韩欧美麻豆| 久久国产精品色婷婷| 欧美日韩第一区日日骚| 亚洲伦理在线精品| 成人一区二区三区视频| 日韩久久精品一区| 婷婷综合久久一区二区三区| 91国产免费看| 国产精品国产精品国产专区不蜜| 国内精品第一页| 91精品国产综合久久久蜜臀粉嫩| 一区二区三区**美女毛片| 高清视频一区二区| 精品国产乱码久久久久久牛牛| 丝袜诱惑亚洲看片 | 亚洲精品视频一区| 国产超碰在线一区| 久久久噜噜噜久久人人看| 另类成人小视频在线| 91精品国产色综合久久不卡蜜臀| 亚洲一区二区视频| 91成人国产精品| 亚洲女同女同女同女同女同69| 99久久婷婷国产精品综合| 国产精品久久久久永久免费观看 | 色综合久久综合网| 亚洲另类春色国产| 欧美综合久久久| 一区二区三区av电影 | 丰满少妇久久久久久久| 国产三级欧美三级| 成人性生交大片免费看视频在线| 国产欧美精品区一区二区三区| 国产成人三级在线观看| 日本一区二区不卡视频| 99久久精品免费看| 一区二区三区欧美在线观看| 欧洲精品中文字幕| 亚洲成人在线网站| 8x福利精品第一导航| 亚洲福利一区二区三区| 欧美午夜一区二区三区| 一区二区三区欧美日| 欧美高清视频一二三区 | 制服丝袜国产精品| 亚洲影院久久精品| 国产精品午夜久久| 中文一区二区在线观看| 亚洲国产视频网站| 激情五月婷婷综合| 99久久精品免费看国产免费软件| 欧美性xxxxx极品少妇| 日韩女优av电影| 国产精品国产三级国产aⅴ中文| 亚洲va中文字幕| 久久电影网电视剧免费观看| 成人黄动漫网站免费app| 欧美日韩亚洲综合一区二区三区| 亚洲精品一区二区三区福利| 亚洲视频一区二区在线| 麻豆成人久久精品二区三区红| 99精品国产99久久久久久白柏| 欧美一区二区三区在线视频| 国产精品狼人久久影院观看方式| 日韩高清中文字幕一区| 99久久夜色精品国产网站| 91精品国产色综合久久ai换脸| 国产精品你懂的在线| 伊人夜夜躁av伊人久久| 成人国产精品免费观看动漫| 日韩免费观看高清完整版在线观看| 最好看的中文字幕久久| 国精产品一区一区三区mba桃花| 色婷婷精品久久二区二区蜜臂av| 精品久久久久久最新网址| 亚洲欧美成人一区二区三区| 狠狠色丁香婷综合久久| 欧美日韩国产综合视频在线观看| 国产精品网站导航| 国产又粗又猛又爽又黄91精品| 欧美亚洲动漫精品| 国产精品理伦片| 理论片日本一区| 日韩欧美国产麻豆| 天天综合色天天| 91福利社在线观看| 国产精品国产三级国产| 国产精品中文字幕一区二区三区| 欧美顶级少妇做爰| 亚洲在线一区二区三区| 91香蕉视频污| 国产精品久久久久精k8| 精品在线播放免费| 欧美一区二区三区色| 亚洲国产日韩在线一区模特| 99视频有精品| 久久久久久久久久久久久夜| 成人av网址在线| 日本一区二区免费在线观看视频 | 国产精品久久久久久久久久久免费看| 精油按摩中文字幕久久| 91精品国产综合久久国产大片| 亚洲综合一区二区| 色婷婷av久久久久久久| 综合欧美亚洲日本| 99re这里都是精品| 国产亚洲成年网址在线观看| 久久99精品一区二区三区| 欧美人狂配大交3d怪物一区 | 日本一道高清亚洲日美韩| 欧美精品久久99| 日本不卡视频一二三区| 555夜色666亚洲国产免| 老鸭窝一区二区久久精品| 欧美一级二级在线观看| 美女在线一区二区| 欧美精品一区男女天堂| 国产主播一区二区三区| 久久久噜噜噜久久中文字幕色伊伊| 韩国女主播一区| 亚洲国产精品v| av一二三不卡影片| 亚洲美女一区二区三区| 91国产免费看| 亚洲男帅同性gay1069| 色噜噜狠狠色综合中国| 亚洲午夜影视影院在线观看| 欧美日韩免费观看一区二区三区 | 欧美精品一区二区三| 国产精品综合一区二区三区| 中文在线资源观看网站视频免费不卡| 国产剧情一区二区三区| 国产精品丝袜黑色高跟| 日本高清无吗v一区| 亚洲国产视频网站| 日韩一卡二卡三卡| 高清不卡一区二区在线| 18欧美亚洲精品| 欧美日韩一级视频| 久久国产尿小便嘘嘘尿| 久久综合五月天婷婷伊人| 国产一区二区伦理片| 国产精品―色哟哟| 精品视频1区2区| 欧美三级电影一区| 美女一区二区在线观看| 亚洲人精品一区| 欧美浪妇xxxx高跟鞋交| 国产一区二区三区国产| 亚洲精选视频在线| 日韩视频免费直播| av电影在线观看不卡| 亚洲综合男人的天堂| 精品国产一区二区三区久久久蜜月| 高清beeg欧美| 奇米影视一区二区三区小说| 日韩一级二级三级精品视频| 不卡一区二区在线| 日精品一区二区三区| 国产三级欧美三级日产三级99 | 精品无码三级在线观看视频| 国产精品精品国产色婷婷| 欧美群妇大交群的观看方式 | 日韩三级伦理片妻子的秘密按摩| 国产福利不卡视频| 亚洲精品日韩专区silk| 精品日韩欧美在线| 欧美在线三级电影| 国产电影一区在线| 视频一区中文字幕国产| 中文字幕在线一区| 日韩欧美视频一区| 97久久超碰国产精品| 国产精品综合一区二区| 首页国产欧美久久| 亚洲乱码国产乱码精品精可以看| 日韩欧美你懂的| 欧美影视一区二区三区| 成人一道本在线| 激情小说欧美图片| 视频在线在亚洲| |精品福利一区二区三区| 久久只精品国产| 久久久一区二区三区| 欧美一区二区播放| 在线看国产一区| 成人精品视频一区二区三区| 久草精品在线观看|