Win32-GUI-Scintilla

 view release on metacpan or  search on metacpan

Scintilla.pm  view on Meta::CPAN

# Retrieve the y value of the point in the window where a position is displayed.
sub PointYFromPosition {
  my ($self, $pos) = @_;
  return $self->SendMessage (2165, 0, $pos);
}
# Retrieve the line containing a position.
sub LineFromPosition {
  my ($self, $pos) = @_;
  return $self->SendMessage (2166, $pos, 0);
}
# Retrieve the position at the start of a line.
sub PositionFromLine {
  my ($self, $line) = @_;
  return $self->SendMessage (2167, $line, 0);
}
# Scroll horizontally and vertically.
sub LineScroll {
  my ($self, $columns, $lines) = @_;
  return $self->SendMessage (2168, $columns, $lines);
}
# Ensure the caret is visible.
sub ScrollCaret {
  my $self = shift;
  return $self->SendMessage (2169, 0, 0);
}
# Replace the selected text with the argument text.
sub ReplaceSel {
  my ($self, $text) = @_;
  return $self->SendMessageNP (2170, 0, $text);
}
# Set to read only or read write.
sub SetReadOnly {
  my ($self, $readOnly) = @_;
  return $self->SendMessage (2171, $readOnly, 0);
}
# Null operation.
sub Null {
  my $self = shift;
  return $self->SendMessage (2172, 0, 0);
}
# Will a paste succeed?
sub CanPaste {
  my $self = shift;
  return $self->SendMessage (2173, 0, 0);
}
# Are there any undoable actions in the undo history?
sub CanUndo {
  my $self = shift;
  return $self->SendMessage (2174, 0, 0);
}
# Delete the undo history.
sub EmptyUndoBuffer {
  my $self = shift;
  return $self->SendMessage (2175, 0, 0);
}
# Undo one action in the undo history.
sub Undo {
  my $self = shift;
  return $self->SendMessage (2176, 0, 0);
}
# Cut the selection to the clipboard.
sub Cut {
  my $self = shift;
  return $self->SendMessage (2177, 0, 0);
}
# Copy the selection to the clipboard.
sub Copy {
  my $self = shift;
  return $self->SendMessage (2178, 0, 0);
}
# Paste the contents of the clipboard into the document replacing the selection.
sub Paste {
  my $self = shift;
  return $self->SendMessage (2179, 0, 0);
}
# Clear the selection.
sub Clear {
  my $self = shift;
  return $self->SendMessage (2180, 0, 0);
}
# Replace the contents of the document with the argument text.
sub SetText {
  my ($self, $text) = @_;
  return $self->SendMessageNP (2181, 0, $text);
}
# Retrieve all the text in the document.
# Returns number of characters retrieved.
# GetText() : Return all text
sub GetText {
  my $self   = shift;
  my $lenght = $self->GetTextLength() + 1;
  my $text   = " " x ($lenght+1);

  if ($self->SendMessageNP (2182, $lenght, $text)) {
    return $text;
  } else {
    return undef;
  }
}
# Retrieve the number of characters in the document.
sub GetTextLength {
  my $self = shift;
  return $self->SendMessage (2183, 0, 0);
}
# Retrieve a pointer to a function that processes messages for this Scintilla.
sub GetDirectFunction {
  my $self = shift;
  return $self->SendMessage (2184, 0, 0);
}
# Retrieve a pointer value to use as the first argument when calling
# the function returned by GetDirectFunction.
sub GetDirectPointer {
  my $self = shift;
  return $self->SendMessage (2185, 0, 0);
}
# Set to overtype (true) or insert mode.
sub SetOvertype {
  my ($self, $overtype) = @_;
  return $self->SendMessage (2186, $overtype, 0);
}
# Returns true if overtype mode is active otherwise false is returned.
sub GetOvertype {
  my $self = shift;
  return $self->SendMessage (2187, 0, 0);
}
# Set the width of the insert mode caret.
sub SetCaretWidth {
  my ($self, $pixelWidth) = @_;
  return $self->SendMessage (2188, $pixelWidth, 0);
}
# Returns the width of the insert mode caret.

Scintilla.pm  view on Meta::CPAN

sub SetPrintWrapMode {
  my ($self, $mode) = @_;
  return $self->SendMessage (2406, $mode, 0);
}
# Is printing line wrapped?
sub GetPrintWrapMode {
  my $self = shift;
  return $self->SendMessage (2407, 0, 0);
}
# Set a fore colour for active hotspots.
sub SetHotspotActiveFore {
  my ($self, $useSetting, $fore) = @_;
  $fore =~ s/.(..)(..)(..)/$3$2$1/;
  return $self->SendMessage (2410, $useSetting, int hex $fore);
}
# Set a back colour for active hotspots.
sub SetHotspotActiveBack {
  my ($self, $useSetting, $back) = @_;
  $back =~ s/.(..)(..)(..)/$3$2$1/;
  return $self->SendMessage (2411, $useSetting, int hex $back);
}
# Enable / Disable underlining active hotspots.
sub SetHotspotActiveUnderline {
  my ($self, $underline) = @_;
  return $self->SendMessage (2412, $underline, 0);
}
# Limit hotspots to single line so hotspots on two lines don't merge.
sub SetHotspotSingleLine {
  my ($self, $singleLine) = @_;
  return $self->SendMessage (2421, $singleLine, 0);
}
# Move caret between paragraphs (delimited by empty lines).
sub ParaDown {
  my $self = shift;
  return $self->SendMessage (2413, 0, 0);
}
sub ParaDownExtend {
  my $self = shift;
  return $self->SendMessage (2414, 0, 0);
}
sub ParaUp {
  my $self = shift;
  return $self->SendMessage (2415, 0, 0);
}
sub ParaUpExtend {
  my $self = shift;
  return $self->SendMessage (2416, 0, 0);
}
# Given a valid document position, return the previous position taking code
# page into account. Returns 0 if passed 0.
sub PositionBefore {
  my ($self, $pos) = @_;
  return $self->SendMessage (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.
sub PositionAfter {
  my ($self, $pos) = @_;
  return $self->SendMessage (2418, $pos, 0);
}
# Copy a range of text to the clipboard. Positions are clipped into the document.
sub CopyRange {
  my ($self, $start, $end) = @_;
  return $self->SendMessage (2419, $start, $end);
}
# Copy argument text to the clipboard.
# CopyText(text)
sub CopyText {
  my ($self, $text) = @_;
  my $length = length $text;
  return $self->SendMessageNP (2420, $length, $text);
}
use constant SC_SEL_STREAM => 0 ;
use constant SC_SEL_RECTANGLE => 1 ;
use constant SC_SEL_LINES => 2 ;
# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or
# by lines (SC_SEL_LINES).
sub SetSelectionMode {
  my ($self, $mode) = @_;
  return $self->SendMessage (2422, $mode, 0);
}
# Get the mode of the current selection.
sub GetSelectionMode {
  my $self = shift;
  return $self->SendMessage (2423, 0, 0);
}
# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
sub GetLineSelStartPosition {
  my ($self, $line) = @_;
  return $self->SendMessage (2424, $line, 0);
}
# Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
sub GetLineSelEndPosition {
  my ($self, $line) = @_;
  return $self->SendMessage (2425, $line, 0);
}
# Move caret down one line, extending rectangular selection to new caret position.
sub LineDownRectExtend {
  my $self = shift;
  return $self->SendMessage (2426, 0, 0);
}
# Move caret up one line, extending rectangular selection to new caret position.
sub LineUpRectExtend {
  my $self = shift;
  return $self->SendMessage (2427, 0, 0);
}
# Move caret left one character, extending rectangular selection to new caret position.
sub CharLeftRectExtend {
  my $self = shift;
  return $self->SendMessage (2428, 0, 0);
}
# Move caret right one character, extending rectangular selection to new caret position.
sub CharRightRectExtend {
  my $self = shift;
  return $self->SendMessage (2429, 0, 0);
}
# Move caret to first position on line, extending rectangular selection to new caret position.
sub HomeRectExtend {
  my $self = shift;
  return $self->SendMessage (2430, 0, 0);
}
# Move caret to before first visible character on line.
# If already there move to first character on line.
# In either case, extend rectangular selection to new caret position.
sub VCHomeRectExtend {
  my $self = shift;

Scintilla.pm  view on Meta::CPAN

  Retrieve a range of text.

=item C<HideSelection> (normal)

  Draw the selection in normal style or with selection highlighted.

=item C<PointXFromPosition> (position)

  Retrieve the x value of the point in the window where a position is displayed.

=item C<PointYFromPosition> (position)

  Retrieve the y value of the point in the window where a position is displayed.

=item C<LineFromPosition> (position)

  Retrieve the line containing a position.

=item C<PositionFromLine> (line)

  Retrieve the position at the start of a line.

=item C<LineScroll> (columns, lines)

  Scroll horizontally and vertically.

=item C<ScrollCaret>

  Ensure the caret is visible.

=item C<ReplaceSel> (text)

  Replace the selected text with the argument text.

=item C<SetReadOnly> (bool)

  Set to read only or read write.

=item C<Null>

  Null operation.

=item C<CanPaste>

  Will a paste succeed?

=item C<CanUndo>

  Are there any undoable actions in the undo history?

=item C<EmptyUndoBuffer>

  Delete the undo history.

=item C<Undo>

  Undo one action in the undo history.

=item C<Cut>

  Cut the selection to the clipboard.

=item C<Copy>

  Copy the selection to the clipboard.

=item C<Paste>

  Paste the contents of the clipboard into the document replacing the selection.

=item C<Clear>

  Clear the selection.

=item C<SetText> (text)

  Replace the contents of the document with the argument text.

=item C<GetText>

  Retrieve all the text in the document.

=item C<GetTextLength>

  Retrieve the number of characters in the document.

=item C<GetDirectFunction>

  Retrieve a pointer to a function that processes messages for this Scintilla.

=item C<GetDirectPointer>

  Retrieve a pointer to a function that processes messages for this Scintilla.

=item C<SetOvertype> (overtype)

  Set to overtype (true) or insert mode.

=item C<GetOvertype>

  Returns true if overtype mode is active otherwise false is returned.

=item C<SetCaretWidth> (pixelWidth)

  Set the width of the insert mode caret.

=item C<GetCaretWidth>

  Returns the width of the insert mode caret.

=item C<SetTargetStart> (position)

  Sets the position that starts the target which is used for updating the
  document without affecting the scroll position.

=item C<GetTargetStart>

  Get the position that starts the target.

=item C<SetTargetEnd> (position)

  Sets the position that ends the target which is used for updating the
  document without affecting the scroll position.

=item C<GetTargetEnd>

  Get the position that ends the target.

=item C<ReplaceTarget> (text)

Scintilla.pm  view on Meta::CPAN

  Set the way the caret is kept visible when going sideway.
  The exclusion zone is given in pixels.

=item C<SetYCaretPolicy> (caretPolicy, caretSlop)

  Set the way the line the caret is on is kept visible.
  The exclusion zone is given in lines.

=item C<SetPrintWrapMode> (mode)

  Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).

=item C<GetPrintWrapMode>

  Is printing line wrapped?

=item C<SetHotspotActiveFore> (useSetting, color)

  Set a fore colour for active hotspots.

=item C<SetHotspotActiveBack> (useSetting, color)

  Set a back colour for active hotspots.

=item C<SetHotspotActiveUnderline> (underline)

  Enable / Disable underlining active hotspots.

=item C<SetHotspotSingleLine> (singleLine)

  Limit hotspots to single line so hotspots on two lines don't merge.

=item C<ParaDown>

  Move caret between paragraphs (delimited by empty lines).

=item C<ParaDownExtend>

  Move caret between paragraphs (delimited by empty lines).

=item C<ParaUp>

  Move caret between paragraphs (delimited by empty lines).

=item C<ParaUpExtend>

  Move caret between paragraphs (delimited by empty lines).

=item C<PositionBefore> (pos)

  Given a valid document position, return the previous position taking code
  page into account. Returns 0 if passed 0.

=item C<PositionAfter>(pos)

  Given a valid document position, return the next position taking code
  page into account. Maximum value returned is the last position in the document.

=item C<CopyRange>(start, end)

  Copy a range of text to the clipboard. Positions are clipped into the document.

=item C<CopyText> (length, text)

  Copy argument text to the clipboard.

=item C<SetSelectionMode> (mode)

  Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or by lines (SC_SEL_LINES).

=item C<GetSelectionMode>

  Get the mode of the current selection.

=item C<GetLineSelStartPosition> (line)

  Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).

=item C<GetLineSelEndPosition> (line)

  Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).

=item C<LineDownRectExtend>

  Move caret down one line, extending rectangular selection to new caret position.

=item C<LineUpRectExtend>

  Move caret up one line, extending rectangular selection to new caret position.

=item C<CharLeftRectExtend>

  Move caret left one character, extending rectangular selection to new caret position.

=item C<CharRightRectExtend>

  Move caret right one character, extending rectangular selection to new caret position.

=item C<HomeRectExtend>

  Move caret to first position on line, extending rectangular selection to new caret position.

=item C<VCHomeRectExtend>

  Move caret to before first visible character on line.
  If already there move to first character on line.
  In either case, extend rectangular selection to new caret position.

=item C<LineEndRectExtend>

  Move caret to last position on line, extending rectangular selection to new caret position.

=item C<PageUpRectExtend>

  Move caret one page up, extending rectangular selection to new caret position.

=item C<PageDownRectExtend>

  Move caret one page down, extending rectangular selection to new caret position.

=item C<StutteredPageUp>

  Move caret to top of page, or one page up if already at top of page.

=item C<StutteredPageUpExtend>



( run in 0.660 second using v1.01-cache-2.11-cpan-84e82930d8c )