代码拉取完成,页面将自动刷新
同步操作将从 爬山虎/ndd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#pragma once
#include <qsciscintilla.h>
#include <Scintilla.h>
#include <SciLexer.h>
#include <QMouseEvent>
#include <QMimeData>
#include "common.h"
typedef sptr_t(*SCINTILLA_FUNC) (sptr_t ptr, unsigned int, uptr_t, sptr_t);
typedef sptr_t SCINTILLA_PTR;
const int MARK_BOOKMARK = 24;
const int MARK_HIDELINESBEGIN = 23;
const int MARK_HIDELINESEND = 22;
const int MARK_HIDELINESUNDERLINE = 21;
const int NB_FOLDER_STATE = 7;
struct LanguageName {
const QString lexerName;
const QString shortName;
const QString longName;
LangType LangID = L_TXT;
int lexerID = 0;
};
struct PosInfo {
int line;
int index;
PosInfo(int line_, int index_):line(line_),index(index_)
{
}
};
class FindRecords;
class ScintillaEditView : public QsciScintilla
{
Q_OBJECT
public:
ScintillaEditView(QWidget *parent);
~ScintillaEditView();
void setNoteWidget(QWidget* win);
//void resetDefaultFontStyle();
sptr_t execute(quint32 Msg, uptr_t wParam = 0, sptr_t lParam = 0) const;
static QsciLexer * createLexer(int lexerId);
void appendMarkRecord(FindRecords *r);
void releaseAllMark();
QList<FindRecords*>& getCurMarkRecord();
bool gotoPrePos();
bool gotoNextPos();
void adjuctSkinStyle();
//设置文档的缩进参考线
void setIndentGuide(bool willBeShowed);
//virtual void setLexer(QsciLexer *lexer = 0) override;
signals:
void delayWork();
public:
static const int _SC_MARGE_LINENUMBER;
static const int _SC_MARGE_SYBOLE;
static const int _SC_MARGE_FOLDER;
#ifdef Q_OS_WIN //目前这个破玩意压根没用
static LanguageName langNames[L_EXTERNAL + 1];
#endif
static const int _markersArray[][NB_FOLDER_STATE];
protected:
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
public slots:
void updateLineNumberWidth(int lineNumberMarginDynamicWidth=0);
void slot_linePosChanged(int line, int pos);
private:
void updateLineNumbersMargin(bool forcedToHide);
void autoAdjustLineWidth(int xScrollValue);
void showMargin(int whichMarge, bool willBeShowed);
void init();
private slots:
void slot_delayWork();
void slot_scrollXValueChange(int value);
private:
SCINTILLA_FUNC m_pScintillaFunc;
SCINTILLA_PTR m_pScintillaPtr;
QWidget* m_NoteWin;
int m_preFirstLineNum;
QList<FindRecords *> m_curMarkList;
int m_curPos;
//回退到上个位置
QList<int> m_prePosRecord;
//往前到下个位置
QList<int> m_nextPosRecord;
public:
static int s_tabLens;
static bool s_noUseTab;
static int s_bigTextSize;
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。