代码拉取完成,页面将自动刷新
同步操作将从 nessan1987/NDD-HexConverter 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef NDD_MY_QSCIDOC_H
#define NDD_MY_QSCIDOC_H
#include <vector>
#include <QWidget>
#include <QByteArray>
#include <qsciscintilla.h>
#include <Scintilla.h>
#include "Conversion.h"
typedef enum {
SEL_DIR_R2L,
SEL_DIR_L2R
} SelectDirection;
typedef enum {
SEL_SORT_BY_NONE,
SEL_SORT_BY_POSITION,
SEL_SORT_BY_SELECT_ORDER
} SelectSortType;
struct SelectInfo {
intptr_t leftPos = 0;
intptr_t rightPos = 0;
intptr_t order = -1; // 0 based index
SelectDirection direction = SEL_DIR_L2R; // L2R or R2L
intptr_t nbVirtualCaretSpc = 0;
intptr_t nbVirtualAnchorSpc = 0;
SelectInfo(intptr_t lPos, intptr_t rPos, intptr_t order, SelectDirection dir = SEL_DIR_L2R, intptr_t vAnchorNbSpc = 0, intptr_t vCaretNbSpc = 0);
bool Valid() const;
};
typedef std::vector<SelectInfo> SelectInfos;
typedef sptr_t(*SCINTILLA_FUNC) (sptr_t ptr, unsigned int, uptr_t, sptr_t);
typedef sptr_t SCINTILLA_PTR;
class MyQsciDoc : public QWidget
{
Q_OBJECT
#define REF_EDIT(edit) auto &edit = *(this->getCurrentEditFunc())
public:
MyQsciDoc(QWidget* parent, std::function<QsciScintilla* ()> func);
virtual ~MyQsciDoc();
SelectInfos GetMultipleSelections(SelectSortType sortType = SEL_SORT_BY_NONE);
void SelectMultipleRanges(const SelectInfos& selections);
void SetText(const QByteArray& text);
QByteArray GetText();
NewLineType GetNewLineType();
QsciScintilla* operator->();
bool Valid();
protected:
private:
QWidget* parentWidget;
std::function<QsciScintilla* ()> getCurrentEditFunc;
};
#endif // NDD_MY_QSCIDOC_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。