1#ifndef _KVI_INPUT_EDITOR_H_
2#define _KVI_INPUT_EDITOR_H_
60#define KVI_INPUT_MAX_BUFFER_SIZE 400
61#define KVI_INPUT_XTRAPADDING 1
62#define KVI_INPUT_MARGIN 4
63#define KVI_INPUT_BLINK_TIME 800
64#define KVI_INPUT_DRAG_TIMEOUT 30
65#define KVI_INPUT_DEF_BACK 100
66#define KVI_INPUT_DEF_FORE 101
69#define ACCEL_KEY(k) "\t" + QKeySequence(Qt::ControlModifier + Qt::Key_##k).toString()
91 Q_PROPERTY(
int TransparencyCapable READ heightHint)
112 static int g_iInputFontCharWidth[256];
206 : m_eType(eType), m_szText(szText), m_iStartPosition(iStartPosition)
227 void setText(
const QString & szText) { m_szText = szText; }
233 const QString &
text()
const {
return m_szText; }
274 int heightHint()
const;
281 void setText(
const QString szText);
287 QString
text()
const {
return m_szTextBuffer; }
292 QString textBeforeCursor()
const;
299 void insertChar(QChar c);
306 void insertText(
const QString & szTxt);
312 void applyOptions(
bool bRefreshCachedMetrics =
true);
337 void clearUndoStack();
347 void replaceWordBeforeCursor(
const QString & szWord,
const QString & szReplacement,
bool bRepaint =
true);
358 int replaceSegment(
int iStart,
int iLength,
const QString & szString);
366 void getWordBeforeCursor(QString &
szBuffer,
bool * bIsFirstWordInLine);
373 static QChar getSubstituteChar(
unsigned short uControlCode);
378 void ensureCursorVisible();
384 void repaintWithCursorOn();
386 void clearSelection();
393 int charIndexFromXPosition(qreal fXPos);
400 qreal xPositionFromCharIndex(
int iChIdx);
406 void killDragTimer();
412 void handleDragSelection();
438 void moveCursorTo(
int iIdx,
bool bRepaint =
true);
447 void returnPressed(
bool bRepaint =
true);
468 void completion(
bool bShift);
478 void standardNickCompletion(
bool bAddMask, QString & szWord,
bool bFirstWordInLine,
bool bInCommand);
488 void standardNickCompletionInsertCompletedText(
const QString & szReplacedWord, QString szCompletedText,
bool bFirstWordInLine,
bool bInCommand);
495 void internalCursorRight(
bool bShift);
502 void internalCursorLeft(
bool bShift);
521 void addUndo(EditCommand * pCommand);
528 QFontMetrics * getLastFontMetrics(
const QFont & font);
536 void iconPopupActivated(QAction * pAction);
546 void copyToSelection(
bool bDonNotCopyToClipboard =
true);
552 void copyToClipboard();
558 void removeSelected();
582 void pasteClipboardWithConfirmation();
591 void pasteSelectionWithConfirmation();
603 void stopPasteSlow();
633 void toggleMultiLineEditor();
651 void previousCharSelection();
657 void nextCharSelection();
675 void previousWordSelection();
681 void nextWordSelection();
704 void insertUnderline();
710 void insertReverse();
716 void insertPlainText();
746 void pasteInternal();
764 void selectAllInternal();
770 void deletePreviousWord();
776 void deleteNextWord();
824 void scrollToLastReadLine();
854 void homeInternalSelection();
860 void endInternalSelection();
902 void toggleCommandMode();
932 void popupTextIconWindow();
937 void showContextPopup(
const QPoint & pos);
942 void showContextPopupHere();
947 void showSpellCheckerCorrectionsPopup();
952 void spellCheckerPopupCorrectionActionTriggered();
957 void addToHistory(
const QString & szString);
960 void insertIconCode(
const QString & szCode);
961 void completionEscapeUnsafeToken(QString & szToken);
962 void installShortcuts();
963 virtual void drawContents(QPainter *);
965 void timerEvent(QTimerEvent *
e)
override;
966 void focusInEvent(QFocusEvent *
e)
override;
967 void focusOutEvent(QFocusEvent *
e)
override;
968 void keyPressEvent(QKeyEvent *
e)
override;
969 void keyReleaseEvent(QKeyEvent *
e)
override;
970 void mousePressEvent(QMouseEvent *
e)
override;
971 void mouseReleaseEvent(QMouseEvent *
e)
override;
972 void mouseDoubleClickEvent(QMouseEvent *
e)
override;
973 void dragEnterEvent(QDragEnterEvent *
e)
override;
974 void dropEvent(QDropEvent *
e)
override;
975 void inputMethodEvent(QInputMethodEvent *
e)
override;
976 QVariant inputMethodQuery(Qt::InputMethodQuery query)
const override;
977 void paintEvent(QPaintEvent *
e)
override;
978 bool checkWordSpelling(
const QString & szWord);
979 void splitTextIntoSpellCheckerBlocks(
const QString & szText, std::vector<KviInputEditorSpellCheckerBlock> & lBuffer);
981 void fillSpellCheckerCorrectionsPopup();
983 void rebuildTextBlocks();
KviPtrListIterator< T > end(KviPointerList< T > *ptrList)
Definition KviPtrListIterator.h:68
Contains the KviWindow class.
Definition KviCString.h:102
Text icon window class.
Definition KviTextIconWindow.h:41
User list view management class.
Definition KviUserListView.h:226
Base class for all windows in KVIrc.
Definition KviWindow.h:75
#define e
Definition detector.cpp:70
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
char szBuffer[4096]
Definition winamp.cpp:77