scintillahexeditview.h 785 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include <qsciscintilla.h>
  3. #include <Scintilla.h>
  4. #include <QDragEnterEvent>
  5. #include <QDropEvent>
  6. typedef sptr_t(*SCINTILLA_FUNC) (sptr_t ptr, unsigned int, uptr_t, sptr_t);
  7. typedef sptr_t SCINTILLA_PTR;
  8. class ScintillaHexEditView : public QsciScintilla
  9. {
  10. Q_OBJECT
  11. public:
  12. ScintillaHexEditView(QWidget *parent = Q_NULLPTR);
  13. virtual ~ScintillaHexEditView();
  14. void setNoteWidget(QWidget * win);
  15. sptr_t execute(quint32 Msg, uptr_t wParam = 0, sptr_t lParam = 0) const;
  16. private:
  17. void init();
  18. protected:
  19. void dragEnterEvent(QDragEnterEvent * event);
  20. void dropEvent(QDropEvent * e);
  21. private:
  22. static bool _SciInit;
  23. SCINTILLA_FUNC m_pScintillaFunc = nullptr;
  24. SCINTILLA_PTR m_pScintillaPtr = 0;
  25. QWidget* m_NoteWin;
  26. };