Wx-Scintilla
view release on metacpan or search on metacpan
wx-scintilla/src/scintilla.cpp view on Meta::CPAN
// Retrieve the line containing a position.
int wxScintillaTextCtrl::LineFromPosition(int pos)
{
return SendMsg(2166, pos, 0);
}
// Retrieve the position at the start of a line.
int wxScintillaTextCtrl::PositionFromLine(int line)
{
return SendMsg(2167, line, 0);
}
// Scroll horizontally and vertically.
void wxScintillaTextCtrl::LineScroll(int columns, int lines)
{
SendMsg(2168, columns, lines);
}
// Ensure the caret is visible.
void wxScintillaTextCtrl::EnsureCaretVisible()
{
SendMsg(2169, 0, 0);
}
// Replace the selected text with the argument text.
void wxScintillaTextCtrl::ReplaceSelection(const wxString& text)
{
SendMsg(2170, 0, (sptr_t)(const char*)wx2stc(text));
}
// Set to read only or read write.
void wxScintillaTextCtrl::SetReadOnly(bool readOnly)
{
SendMsg(2171, readOnly, 0);
}
// Will a paste succeed?
bool wxScintillaTextCtrl::CanPaste()
{
return SendMsg(2173, 0, 0) != 0;
}
// Are there any undoable actions in the undo history?
bool wxScintillaTextCtrl::CanUndo()
{
return SendMsg(2174, 0, 0) != 0;
}
// Delete the undo history.
void wxScintillaTextCtrl::EmptyUndoBuffer()
{
SendMsg(2175, 0, 0);
}
// Undo one action in the undo history.
void wxScintillaTextCtrl::Undo()
{
SendMsg(2176, 0, 0);
}
// Cut the selection to the clipboard.
void wxScintillaTextCtrl::Cut()
{
SendMsg(2177, 0, 0);
}
// Copy the selection to the clipboard.
void wxScintillaTextCtrl::Copy()
{
SendMsg(2178, 0, 0);
}
// Paste the contents of the clipboard into the document replacing the selection.
void wxScintillaTextCtrl::Paste()
{
SendMsg(2179, 0, 0);
}
// Clear the selection.
void wxScintillaTextCtrl::Clear()
{
SendMsg(2180, 0, 0);
}
// Replace the contents of the document with the argument text.
void wxScintillaTextCtrl::SetText(const wxString& text)
{
SendMsg(2181, 0, (sptr_t)(const char*)wx2stc(text));
}
// Retrieve all the text in the document.
wxString wxScintillaTextCtrl::GetText() {
int len = GetTextLength();
wxMemoryBuffer mbuf(len+1); // leave room for the null...
char* buf = (char*)mbuf.GetWriteBuf(len+1);
SendMsg(2182, len+1, (sptr_t)buf);
mbuf.UngetWriteBuf(len);
mbuf.AppendByte(0);
return stc2wx(buf);
}
// Retrieve the number of characters in the document.
int wxScintillaTextCtrl::GetTextLength()
{
return SendMsg(2183, 0, 0);
}
// Set to overtype (true) or insert mode.
void wxScintillaTextCtrl::SetOvertype(bool overtype)
{
SendMsg(2186, overtype, 0);
}
// Returns true if overtype mode is active otherwise false is returned.
bool wxScintillaTextCtrl::GetOvertype()
{
return SendMsg(2187, 0, 0) != 0;
}
// Set the width of the insert mode caret.
void wxScintillaTextCtrl::SetCaretWidth(int pixelWidth)
{
SendMsg(2188, pixelWidth, 0);
}
// Returns the width of the insert mode caret.
int wxScintillaTextCtrl::GetCaretWidth()
{
return SendMsg(2189, 0, 0);
}
// Sets the position that starts the target which is used for updating the
// document without affecting the scroll position.
wx-scintilla/src/scintilla.cpp view on Meta::CPAN
long c = SendMsg(2495, 0, 0);
return wxColourFromLong(c);
}
// Enable / Disable underlining active hotspots.
void wxScintillaTextCtrl::SetHotspotActiveUnderline(bool underline)
{
SendMsg(2412, underline, 0);
}
// Get whether underlining for active hotspots.
bool wxScintillaTextCtrl::GetHotspotActiveUnderline()
{
return SendMsg(2496, 0, 0) != 0;
}
// Limit hotspots to single line so hotspots on two lines don't merge.
void wxScintillaTextCtrl::SetHotspotSingleLine(bool singleLine)
{
SendMsg(2421, singleLine, 0);
}
// Get the HotspotSingleLine property
bool wxScintillaTextCtrl::GetHotspotSingleLine()
{
return SendMsg(2497, 0, 0) != 0;
}
// Move caret between paragraphs (delimited by empty lines).
void wxScintillaTextCtrl::ParaDown()
{
SendMsg(2413, 0, 0);
}
void wxScintillaTextCtrl::ParaDownExtend()
{
SendMsg(2414, 0, 0);
}
void wxScintillaTextCtrl::ParaUp()
{
SendMsg(2415, 0, 0);
}
void wxScintillaTextCtrl::ParaUpExtend()
{
SendMsg(2416, 0, 0);
}
// Given a valid document position, return the previous position taking code
// page into account. Returns 0 if passed 0.
int wxScintillaTextCtrl::PositionBefore(int pos)
{
return SendMsg(2417, pos, 0);
}
// Given a valid document position, return the next position taking code
// page into account. Maximum value returned is the last position in the document.
int wxScintillaTextCtrl::PositionAfter(int pos)
{
return SendMsg(2418, pos, 0);
}
// Copy a range of text to the clipboard. Positions are clipped into the document.
void wxScintillaTextCtrl::CopyRange(int start, int end)
{
SendMsg(2419, start, end);
}
// Copy argument text to the clipboard.
void wxScintillaTextCtrl::CopyText(int length, const wxString& text)
{
SendMsg(2420, length, (sptr_t)(const char*)wx2stc(text));
}
// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
// by lines (SC_SEL_LINES).
void wxScintillaTextCtrl::SetSelectionMode(int mode)
{
SendMsg(2422, mode, 0);
}
// Get the mode of the current selection.
int wxScintillaTextCtrl::GetSelectionMode()
{
return SendMsg(2423, 0, 0);
}
// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
int wxScintillaTextCtrl::GetLineSelStartPosition(int line)
{
return SendMsg(2424, line, 0);
}
// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
int wxScintillaTextCtrl::GetLineSelEndPosition(int line)
{
return SendMsg(2425, line, 0);
}
// Move caret down one line, extending rectangular selection to new caret position.
void wxScintillaTextCtrl::LineDownRectExtend()
{
SendMsg(2426, 0, 0);
}
// Move caret up one line, extending rectangular selection to new caret position.
void wxScintillaTextCtrl::LineUpRectExtend()
{
SendMsg(2427, 0, 0);
}
// Move caret left one character, extending rectangular selection to new caret position.
void wxScintillaTextCtrl::CharLeftRectExtend()
{
SendMsg(2428, 0, 0);
}
// Move caret right one character, extending rectangular selection to new caret position.
void wxScintillaTextCtrl::CharRightRectExtend()
{
SendMsg(2429, 0, 0);
}
// Move caret to first position on line, extending rectangular selection to new caret position.
void wxScintillaTextCtrl::HomeRectExtend()
{
SendMsg(2430, 0, 0);
}
( run in 3.281 seconds using v1.01-cache-2.11-cpan-81fc1098f69 )