Result:
found more than 464 distributions - search limited to the first 2001 files matching your query ( run in 3.104 )


Class-DBI-Plugin-DeepAbstractSearchPager

 view release on metacpan or  search on metacpan

lib/Class/DBI/Plugin/DeepAbstractSearchPager.pm  view on Meta::CPAN


If you are using a subclass of the pager, this method will not be called.

Will C<die> if using Oracle or DB2, since there is no simple syntax for limiting
the results set. DB2 has a C<FETCH> keyword, but that seems to apply to a
cursor and I don't know if there is a cursor available to the pager. There
should probably be others to add to the unsupported list.

Supports the following drivers:

                      DRIVER        CDBI::P::Pager subclass

 view all matches for this distribution


Class-DBI-Plugin-Pager

 view release on metacpan or  search on metacpan

lib/Class/DBI/Plugin/Pager.pm  view on Meta::CPAN


If you are using a subclass of the pager, this method will not be called.

Will C<die> if using Oracle or DB2, since there is no simple syntax for limiting
the results set. DB2 has a C<FETCH> keyword, but that seems to apply to a
cursor and I don't know if there is a cursor available to the pager. There
should probably be others to add to the unsupported list.

Supports the following drivers:

                      DRIVER        CDBI::P::Pager subclass

 view all matches for this distribution


Class-DBI-Plugin-Senna

 view release on metacpan or  search on metacpan

lib/Class/DBI/Plugin/Senna.pm  view on Meta::CPAN

sub senna_search
{
    my $class  = shift;
    my $query  = shift;
    my $index  = $class->senna_index();
    my $cursor = $index->search($query);

    my $iter   = Class::DBI::Plugin::Senna::Iterator->new($class, $cursor);
    if (wantarray) {
        my @ret;
        while (my $e = $iter->next) {
            push @ret, $e;
        }

lib/Class/DBI/Plugin/Senna.pm  view on Meta::CPAN

    fallback => 1
;

sub new
{
    my($class, $them, $cursor) = @_;
    bless {
        _class  => $them,
        _cursor => $cursor,
    }, $class;
}

sub count
{
    my $self = shift;
    my $cursor = $self->{_cursor};
    return $cursor->hits;
}

sub reset
{
    my $self   = shift;
    my $cursor = $self->{_cursor};
    $cursor->rewind;
}

sub first
{
    my $self = shift;

lib/Class/DBI/Plugin/Senna.pm  view on Meta::CPAN


sub next
{
    my $self   = shift;
    my $class  = $self->{_class};
    my $cursor = $self->{_cursor};

    my $result = $cursor->next();
    my $obj;
    if (defined $result) {
        $obj = $class->retrieve($result->key);
    }
    return $obj;

 view all matches for this distribution


Class-Dot

 view release on metacpan or  search on metacpan

contrib/vim/taglist.vim  view on Meta::CPAN

    " Automatically open the taglist window on Vim startup
    if !exists('Tlist_Auto_Open')
        let Tlist_Auto_Open = 0
    endif

    " When the taglist window is toggle opened, move the cursor to the
    " taglist window
    if !exists('Tlist_GainFocus_On_ToggleOpen')
        let Tlist_GainFocus_On_ToggleOpen = 0
    endif

contrib/vim/taglist.vim  view on Meta::CPAN

" sml language
let s:tlist_def_sml_settings = 'sml;e:exception;c:functor;s:signature;' .
                             \ 'r:structure;t:type;v:value;f:function'

" sql language
let s:tlist_def_sql_settings = 'sql;c:cursor;F:field;P:package;r:record;' .
            \ 's:subtype;t:table;T:trigger;v:variable;f:function;p:procedure'

" tcl language
let s:tlist_def_tcl_settings = 'tcl;c:class;f:method;m:method;p:procedure'

contrib/vim/taglist.vim  view on Meta::CPAN

    new taglist_debug.txt
    " Delete all the lines (if the buffer already exists)
    silent! %delete _
    " Add the messages
    silent! put =s:tlist_msg
    " Move the cursor to the first line
    normal! gg
endfunction

" Tlist_Log_Msg
" Log the supplied debug message along with the time

contrib/vim/taglist.vim  view on Meta::CPAN

    " this file, as the tags for this file are removed
    call s:Tlist_Window_Update_Line_Offsets(a:fidx + 1, 0, end - start + 1)
endfunction

" Tlist_Remove_File
" Remove the file under the cursor or the specified file index
" user_request - User requested to remove the file from taglist
function! s:Tlist_Remove_File(file_idx, user_request)
    let fidx = a:file_idx

    if fidx == -1

contrib/vim/taglist.vim  view on Meta::CPAN

        let s:tlist_win_maximized = 1
    endif
endfunction

" Tlist_Ballon_Expr
" When the mouse cursor is over a tag in the taglist window, display the
" tag prototype (balloon)
function! Tlist_Ballon_Expr()
    " Get the file index
    let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(v:beval_lnum)
    if fidx == -1

contrib/vim/taglist.vim  view on Meta::CPAN

    endif

    " Define the taglist autocommands
    augroup TagListAutoCmds
        autocmd!
        " Display the tag prototype for the tag under the cursor.
        autocmd CursorHold __Tag_List__ call s:Tlist_Window_Show_Info()
        " Highlight the current tag periodically
        autocmd CursorHold * silent call s:Tlist_Window_Highlight_Tag(
                            \ fnamemodify(bufname('%'), ':p'), line('.'), 1, 0)

contrib/vim/taglist.vim  view on Meta::CPAN

    if g:Tlist_File_Fold_Auto_Close
        " Close all the folds
        silent! %foldclose
    endif

    " Move the cursor to the top of the taglist window
    normal! gg
endfunction

" Tlist_Post_Close_Cleanup()
" Close the taglist window and adjust the Vim window width

contrib/vim/taglist.vim  view on Meta::CPAN

            " create a fold for this tag type
            let fold_start = ttype_start_lnum
            let fold_end = fold_start + {fidx_ttype}_count
            exe fold_start . ',' . fold_end  . 'fold'

            " Adjust the cursor position
            if g:Tlist_Compact_Format == 0
                exe ttype_start_lnum + {fidx_ttype}_count
            else
                exe ttype_start_lnum + {fidx_ttype}_count + 1
            endif

contrib/vim/taglist.vim  view on Meta::CPAN

        let save_winnr = winnr()

        " Goto the taglist window
        call s:Tlist_Window_Goto_Window()

        " Save the cursor position
        let save_line = line('.')
        let save_col = col('.')

        " Update the taglist window
        call s:Tlist_Window_Refresh_File(fname, a:ftype)

        " Restore the cursor position
        if v:version >= 601
            call cursor(save_line, save_col)
        else
            exe save_line
            exe 'normal! ' . save_col . '|'
        endif

contrib/vim/taglist.vim  view on Meta::CPAN


        " Goto the taglist window
        call s:Tlist_Window_Goto_Window()

        if !g:Tlist_Auto_Highlight_Tag || !g:Tlist_Highlight_Tag_On_BufEnter
            " Save the cursor position
            let save_line = line('.')
            let save_col = col('.')
        endif

        " Update the taglist window

contrib/vim/taglist.vim  view on Meta::CPAN

            endif

            " Highlight the current tag
            call s:Tlist_Window_Highlight_Tag(filename, cur_lnum, 1, center_tag_line)
        else
            " Restore the cursor position
            if v:version >= 601
                call cursor(save_line, save_col)
            else
                exe save_line
                exe 'normal! ' . save_col . '|'
            endif
        endif

contrib/vim/taglist.vim  view on Meta::CPAN

        call s:Tlist_Window_Refresh_File(s:tlist_{fidx}_filename,
                    \   s:tlist_{fidx}_filetype)

        exe s:tlist_{fidx}_start . ',' . s:tlist_{fidx}_end . 'foldopen!'

        " Go back to the cursor line before the tag list is sorted
        call search(curline, 'w')

        call s:Tlist_Menu_Update_File(1)
    else
        call s:Tlist_Menu_Remove_File()

contrib/vim/taglist.vim  view on Meta::CPAN

    exe 'match TagListTagName ' . pat
endfunction

" Tlist_Window_Open_File
" Open the specified file in either a new window or an existing window
" and place the cursor at the specified tag pattern
function! s:Tlist_Window_Open_File(win_ctrl, filename, tagpat)
    call s:Tlist_Log_Msg('Tlist_Window_Open_File (' . a:filename . ',' .
                \ a:win_ctrl . ')')
    let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh
    let s:Tlist_Skip_Refresh = 1

contrib/vim/taglist.vim  view on Meta::CPAN

    endif
    endif

    " Jump to the tag
    if a:tagpat != ''
        " Add the current cursor position to the jump list, so that user can
        " jump back using the ' and ` marks.
        mark '
        silent call search(a:tagpat, 'w')

        " Bring the line to the middle of the window

contrib/vim/taglist.vim  view on Meta::CPAN


    call s:Tlist_Window_Open_File(a:win_ctrl, s:tlist_{fidx}_filename, tagpat)
endfunction

" Tlist_Window_Show_Info()
" Display information about the entry under the cursor
function! s:Tlist_Window_Show_Info()
    call s:Tlist_Log_Msg('Tlist_Window_Show_Info()')

    " Clear the previously displayed line
    echo

contrib/vim/taglist.vim  view on Meta::CPAN

        " Calling the winline() function makes the line visible.  Don't know
        " of a better way to achieve this.
        let lnum = line('.')

        if lnum < s:tlist_{fidx}_start || lnum > s:tlist_{fidx}_end
            " Move the cursor to the beginning of the file
            exe s:tlist_{fidx}_start
        endif

        if foldclosed('.') != -1
            .foldopen

contrib/vim/taglist.vim  view on Meta::CPAN


    return s:tlist_{fidx}_{tidx}_tag_name
endfunction

" Tlist_Window_Move_To_File
" Move the cursor to the beginning of the current file or the next file
" or the previous file in the taglist window
" dir == -1, move to start of current or previous function
" dir == 1, move to start of next function
function! s:Tlist_Window_Move_To_File(dir)
    if foldlevel('.') == 0

contrib/vim/taglist.vim  view on Meta::CPAN

    let tagpat = s:Tlist_Get_Tag_SearchPat(fidx, a:tidx)
    if tagpat == ''
        return
    endif

    " Add the current cursor position to the jump list, so that user can
    " jump back using the ' and ` marks.
    mark '

    silent call search(tagpat, 'w')

 view all matches for this distribution


Class-Maker

 view release on metacpan or  search on metacpan

t/t_schema/02_tangram.t  view on Meta::CPAN


	my %class_hash = @$class_schema;

	foreach my $class ( keys %class_hash )
	{
		my $cursor = $storage->cursor( $class );

		my $inst_cnt = 0;

		while(my $obj = $cursor->current())
		{
			#$obj->info() if $obj->can('info');

			$inst_cnt++;

			$cursor->next();
		}

		println qq{'$inst_cnt' instance(s) of class '$class' detected.};

		$cursor->close();
	}

	eval
	{
		1;

 view all matches for this distribution


Class-Rebless

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


Tue, 22 Mar 2011 09:23:10 +0200  Gaal Yahas  <gaal@forum2.org>

* This be 0.09.
* Do not descend into branches we've seen, in cyclical structures. (RJBS)
* Do not expose private recursor arguments via the public API.

Thu, 10 May 2007 19:24:11 +0300  Gaal Yahas  <gaal@forum2.org>

* This be 0.08.
* Make license more visible.

 view all matches for this distribution


Class-Trait

 view release on metacpan or  search on metacpan

lib/Class/Trait.pm  view on Meta::CPAN


Class::Trait - Deprecated.  Please use Moose::Role.

=head1 DEPRECATED

This module has long been deprecated. It was a precursor to Moose::Role and
other attempts to implement roles/traits in Perl. If you need standalone
roles, please use L<Role::Basic> or L<Role::Tiny>. If you need full OO, please
use L<Moose> or L<Moo>.

=head1 SYNOPSIS

 view all matches for this distribution


Claude-Agent

 view release on metacpan or  search on metacpan

lib/Claude/Agent/CLI.pm  view on Meta::CPAN

                     Available: black, red, green, yellow, blue, magenta, cyan, white
                     Also: bright_* variants, and "color on_background" combinations
    message        - Custom message format (default: "{spinner} $message")
                     Placeholders: {spinner}, {elapsed}, {percent}, etc.
    interval       - Animation interval in seconds (default: 0.1)
    terminal_line  - Skip STDIN cursor query by providing line number

    use IO::Async::Loop;
    my $loop = IO::Async::Loop->new;

    # Simple usage

lib/Claude/Agent/CLI.pm  view on Meta::CPAN


=head3 move_up

    move_up($n);

Move cursor up N lines.

=cut

sub move_up {
    my ($n) = @_;

 view all matches for this distribution


ClickHouse-Encoder

 view release on metacpan or  search on metacpan

eg/json_path_projection.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Project a small subset of columns out of a wide select - decode
# only the columns we care about; the rest have their wire bytes
# consumed (so the cursor stays aligned) but are not materialized
# into SVs. Memory stays bounded by the kept-columns subset.
#
# Usage:
#     perl eg/json_path_projection.pl \
#         --host=db --port=8123 \

 view all matches for this distribution


Cmd-Dwarf

 view release on metacpan or  search on metacpan

examples/helloworld/app/lib/Dwarf/Module/SocialMedia/Twitter.pm  view on Meta::CPAN


sub get_friends_ids {
	my ($self, $id) = @_;
	$id ||= $self->user_id;

	my $cursor = -1;
	my @ids = ();

	while ($cursor != 0) {
		my $result = $self->call('friends/ids', 'GET', {
			user_id => $id,
			cursor  => $cursor,
		});

		$cursor = $result->{next_cursor_str};
		push @ids, @{ $result->{ids} };
	}

	return \@ids;
}

sub get_followers_ids {
	my ($self, $id) = @_;
	$id ||= $self->user_id;

	my $cursor = -1;
	my @ids;

	while ($cursor != 0) {
		my $result = $self->call('followers/ids', 'GET', {
			user_id => $id,
			cursor  => $cursor,
		});

		$cursor = $result->{next_cursor_str};
		push @ids, @{ $result->{ids} };
	}

	return @ids;
}

 view all matches for this distribution


Cmenu

 view release on metacpan or  search on metacpan

Cmenu.pm  view on Meta::CPAN

#   DOWN     : move down
#   RITE     : move right
#   LEFT     : move left
#   LYNXR    : move right - can mimic lynx-style motion
#   LYNXL    : move left - can mimic lynx-style motion
# Large cursor movement
#   HOME     : go to top (of menu)
#   END      : go to bottom (of menu)
#   NEXT     : next page 
#   PREV     : previous page
#   JUMP     : leap to a specific menu item 

Cmenu.pm  view on Meta::CPAN

# Method 4
# Explicit control sequences - should work for all terminals regardless
# These should be Uncommented for all systems/platforms
# Hacks for Xterms and standard emacs style definitions
# --< Xterm hacks >---------------------------------------------------------------
   $kseq{"\033[A"}="UP";        # Ansi cursor-up (for DEC xterm)
   $kseq{"\033[B"}="DOWN";      # Ansi cursor-down (for DEC xterm)
   $kseq{"\033[C"}="RITE";     # Ansi cursor-right (for DEC xterm)
   $kseq{"\033[D"}="LEFT";     # Ansi cursor-left (for DEC xterm)
   # added mapping for Home/End and Page buttons for xterms
   $kseq{"\033[E"}="PREV";    # Ansi guess (for DEC xterm)
   $kseq{"\033[F"}="END";     # Ansi end key (for DEC xterm)
   $kseq{"\033[G"}="NEXT";    # Ansi guess (for DEC xterm)
   $kseq{"\033[H"}="HOME";    # Ansi home key (for DEC xterm)

Cmenu.pm  view on Meta::CPAN


  &delwin($menu_inlay);
  &standend();
  &clear();
  &refresh();                 # clears the screen
  &curs_set(1);               # turn the cursor back on
  &endwin();                  # closes all structures and auto restores tty
  print "$message\r\n";
  exit();
}

Cmenu.pm  view on Meta::CPAN

  }
  
  # curses cookery
  cbreak();               # permits keystroke examination
  noecho();               # no input echo until enabled explicitly
  curs_set(0);            # turn the cursor off
  
  # reset and draw button bar
  $menu_hot_button=1;
  &menu_button_bar(0);
  

Cmenu.pm  view on Meta::CPAN

      # ------------------------------------------------------------------------------
    KEYWAIT: for ($action) {
	# Set return value as current option
	$ret=$menu_sel_return[$menu_cur_option].$menu_sep;

	# General cursor movement
	/LEFT/ && do {		# Left arrow
	  # Treat this like an UP-Menu request
	  $action="UP";
#	  redo KEYWAIT;
	};

Cmenu.pm  view on Meta::CPAN

	    &menu_advice("");
	  }
	  &doupdate();
	  last KEYWAIT;
	};
	# larger cursor motion
	/PREV/ && do {		# Page up
	  if($menu_top_option<=0) {
	    # Hit the bottom
	    menu_advice("There are no more options!");
	  } else {

Cmenu.pm  view on Meta::CPAN

	    close(IN);
	    &menu_show("Help File ".$menu_help_root.$menu_help,$help,"HELP");
	    # these get switched off by menu_show so do this
	    cbreak();               # permits keystroke examination
	    noecho();               # no input echo until enabled explicitly
	    curs_set(0);            # turn the cursor off
	    &menu_refresh();
	  } else {
	    beep();
	    &menu_advice("Help file ".$menu_help_root.$menu_help." not found");
	    &doupdate;

Cmenu.pm  view on Meta::CPAN

    &delwin($menu_pane);
  }
  # curses cookery
  nocbreak();               # permits keystroke examination
  echo();               # no input echo until enabled explicitly
  curs_set(1);            # turn the cursor on
  delwin($menu_window);

  $ret;

}

Cmenu.pm  view on Meta::CPAN


#*********
# MENU_DRAW_PANE
#
# Function:  Draws the actual menu especially after a keystroke
#            Usually only necessary after big relocations of the menu cursor
#
# Input:     Nothing
#
# Returns:   Nothing 
#

Cmenu.pm  view on Meta::CPAN

  if(!$field) { $field=""; }         # Make sure something is defined
  $menu_field=newwin(1,$item_len,$item_line,$item_col);
  bkgd($menu_field,$menu_attributes{"advice"});

  # curses cookery
  curs_set(1);            # turn the cursor off
  $ins=1;                 # turn insert mode on
  $pos=length($field);

  # Now edit the field
  READ_KEY:  do {

Cmenu.pm  view on Meta::CPAN


      # ------------------------------------------------------------------------------
      # Switch construct for dealing with key sequence input
      # ------------------------------------------------------------------------------
    EDITKEY: for ($action) {
	# General cursor movement
	/DOWN/ && do {		# down arrow
	  $action="ACCEPT";
	  redo EDITKEY;
	};
	/UP/ && do {		# Up arrow

Cmenu.pm  view on Meta::CPAN

	/RITE/ && do {		# Right arrow
	  $pos++;
	  if($pos>length($field)) {$pos=length($field); }
	  last EDITKEY;
	};
	# larger cursor motion
	/PREV/ && do {		# Page up
	  $action="ACCEPT";
	  redo EDITKEY;
	};
	/NEXT/ && do {		# Page down

Cmenu.pm  view on Meta::CPAN

	}
      }; # end of option check
    } until ($action eq "STOP");

  # return screen to normal after field edit
  curs_set(0);            # turn the cursor off
  delwin($menu_field);
  move($menu_pane,$m_item-$menu_top_option,$m_indent);
  clrtoeol($menu_pane);
  &noutrefresh($menu_window);
}

Cmenu.pm  view on Meta::CPAN


  if(!$message) {
    # no message so destroy the old popup
    # curses cookery
    echo();               # no input echo until enabled explicitly
    curs_set(1);            # turn the cursor on
    &delwin($menu_popup);
    &menu_redraw_backdrop();
  } else {
    # create a new popup
    noecho();               # no input echo until enabled explicitly
    curs_set(0);            # turn the cursor off
  
    while(length($message)>$menu_screen_cols-8) {
      chop $message;
    };
    # Initialise menu pane and control variables

Cmenu.pm  view on Meta::CPAN

    erase($menu_popup);

    # curses cookery
    cbreak();               # permits keystroke examination
    noecho();               # no input echo until enabled explicitly
    curs_set(0);            # turn the cursor off
  
    if(length($message)<$menu_pane_cols) {
      move($menu_popup,$menu_pane_lines/2,($menu_pane_cols-length($message))/2);
      addstr($menu_popup,$message);
      &refresh($menu_popup);

Cmenu.pm  view on Meta::CPAN

      } until ($work ne "");
    }
    # curses cookery
    nocbreak();               # permits keystroke examination
    echo();               # no input echo until enabled explicitly
    curs_set(1);            # turn the cursor on
    &delwin($menu_popup);
    &menu_redraw_backdrop();
  }
  $work;
}

 view all matches for this distribution


Cobalt-LCD

 view release on metacpan or  search on metacpan

lib/Cobalt/LCD.pm  view on Meta::CPAN

Provided you have the sys-apps/cobalt-panel-utils package installed, you can `man` the heck out of those utilities:

lcd-write
lcd-swrite
lcd-yesno
lcd-setcursor
lcd-getip
lcd-flash
readbutton
iflink
iflinkstatus

 view all matches for this distribution


Code-ART

 view release on metacpan or  search on metacpan

lib/Code/ART.pm  view on Meta::CPAN

The original source code (as a string),

=item *

A string index at which some usage of the variable is located
(i.e. a point in the source where a hypothetical cursor would be "over" the variable).

=item *

The new name of the variable.

lib/Code/ART.pm  view on Meta::CPAN


The module distribution includes a Vim plugin: F<vim/perlart.vim>

This plugin sets up a series of mappings that refactor or rename
code elements that have been visually selected or on which the
cursor is sitting.

For example, the <CTRL-S> mapping yanks the visual selection, refactors the
code into a subroutine, requests a name for the new subroutine, requests
a return value (if one seems needed), and then pastes the resulting
subroutine call over the original selected text.

lib/Code/ART.pm  view on Meta::CPAN


=over

=item <CTRL-N>

Rename the variable under the cursor.

=item <CTRL-S>

Search for all instances of the variable under the cursor.

B<I<WARNING>>: In some environments, C<CTRL-S> will suspend terminal
interactions. If your terminal locks up when you use this mapping,
hit C<CTRL-Q> to restart terminal interactions. In this case, 
you will need to either change the behaviour of C<CTRL-S> in

lib/Code/ART.pm  view on Meta::CPAN

or L<https://stackoverflow.com/questions/3446320/in-vim-how-to-map-save-to-ctrl-s>),
or else change this mapping to something else.>

=item gd

Jump to the declaration of the variable under the cursor.

=item E<0x2a>

Jump to the next usage of the variable under the cursor.

=back

The following Visual mode mappings are also available:

=over

=item <CTRL-M>

Match all instances of the variable under the cursor.

=item <CTRL-H>

Hoist all instances of the visually selected code into a lexical variable.

 view all matches for this distribution


Code-TidyAll

 view release on metacpan or  search on metacpan

php/PHP_CodeSniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css  view on Meta::CPAN

<<<<<<< HEAD
   line-height: -25px;
=======
   line-height: -20px;
>>>>>>> ref/heads/feature-branch
   cursor: pointer;
   -moz-user-select: none;
}

/*
 * The above tests are based on "normal" tokens.

 view all matches for this distribution


CodeManager

 view release on metacpan or  search on metacpan

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN


	return {
		%def,
		accelItems => [
# navigation
			[ CursorDown   => 0, 0, kb::Down                , sub{$_[0]-> cursor_down}],
			[ CursorUp     => 0, 0, kb::Up                  , sub{$_[0]-> cursor_up}],
			[ CursorLeft   => 0, 0, kb::Left                , sub{$_[0]-> cursor_left}],
			[ CursorRight  => 0, 0, kb::Right               , sub{$_[0]-> cursor_right}],
			[ PageUp       => 0, 0, kb::PgUp                , sub{$_[0]-> cursor_pgup}],
			[ PageDown     => 0, 0, kb::PgDn                , sub{$_[0]-> cursor_pgdn}],
			[ Home         => 0, 0, kb::Home                , sub{$_[0]-> cursor_home}],
			[ End          => 0, 0, kb::End                 , sub{$_[0]-> cursor_end}],
			[ CtrlPageUp   => 0, 0, kb::PgUp|km::Ctrl       , sub{$_[0]-> cursor_cpgup}],
			[ CtrlPageDown => 0, 0, kb::PgDn|km::Ctrl       , sub{$_[0]-> cursor_cpgdn}],
			[ CtrlHome     => 0, 0, kb::Home|km::Ctrl       , sub{$_[0]-> cursor_chome}],
			[ CtrlEnd      => 0, 0, kb::End |km::Ctrl       , sub{$_[0]-> cursor_cend}],
			[ WordLeft     => 0, 0, kb::Left |km::Ctrl      , sub{$_[0]-> word_left}],
			[ WordRight    => 0, 0, kb::Right|km::Ctrl      , sub{$_[0]-> word_right}],
			[ ShiftCursorDown   => 0, 0, km::Shift|kb::Down                , q(cursor_shift_key)],
			[ ShiftCursorUp     => 0, 0, km::Shift|kb::Up                  , q(cursor_shift_key)],
			[ ShiftCursorLeft   => 0, 0, km::Shift|kb::Left                , q(cursor_shift_key)],
			[ ShiftCursorRight  => 0, 0, km::Shift|kb::Right               , q(cursor_shift_key)],
			[ ShiftPageUp       => 0, 0, km::Shift|kb::PgUp                , q(cursor_shift_key)],
			[ ShiftPageDown     => 0, 0, km::Shift|kb::PgDn                , q(cursor_shift_key)],
			[ ShiftHome         => 0, 0, km::Shift|kb::Home                , q(cursor_shift_key)],
			[ ShiftEnd          => 0, 0, km::Shift|kb::End                 , q(cursor_shift_key)],
			[ ShiftCtrlPageUp   => 0, 0, km::Shift|kb::PgUp|km::Ctrl       , q(cursor_shift_key)],
			[ ShiftCtrlPageDown => 0, 0, km::Shift|kb::PgDn|km::Ctrl       , q(cursor_shift_key)],
			[ ShiftCtrlHome     => 0, 0, km::Shift|kb::Home|km::Ctrl       , q(cursor_shift_key)],
			[ ShiftCtrlEnd      => 0, 0, km::Shift|kb::End |km::Ctrl       , q(cursor_shift_key)],
			[ ShiftWordLeft     => 0, 0, km::Shift|kb::Left |km::Ctrl      , q(cursor_shift_key)],
			[ ShiftWordRight    => 0, 0, km::Shift|kb::Right|km::Ctrl      , q(cursor_shift_key)],
			[ Insert         => 0, 0, kb::Insert , sub {$_[0]-> insertMode(!$_[0]-> insertMode)}],
# edit keys
			[ Delete         => 0, 0, kb::Delete,    sub {
				return if $_[0]-> {readOnly};
				$_[0]-> has_selection ? $_[0]-> delete_block : $_[0]-> delete_char;
			}],
			[ Backspace      => 0, 0, kb::Backspace, sub {$_[0]-> back_char unless $_[0]-> {readOnly}}],
			[ DeleteChunk    => 0, 0, '^Y',          sub {$_[0]-> delete_current_chunk unless $_[0]-> {readOnly}}],
			[ DeleteToEnd    => 0, 0, '^E',          sub {$_[0]-> delete_to_end unless $_[0]-> {readOnly}}],
			[ DupLine        => 0, 0, '^K',          sub {$_[0]-> insert_line($_[0]-> cursorY, $_[0]-> get_line($_[0]-> cursorY)) unless $_[0]-> {readOnly}}],
			[ DeleteBlock    => 0, 0, '@D',          sub {$_[0]-> delete_block unless $_[0]-> {readOnly}}],
			[ SplitLine      => 0, 0, kb::Enter,     sub {$_[0]-> split_line if !$_[0]-> {readOnly} && $_[0]-> {wantReturns}}],
			[ SplitLine2     => 0, 0, km::Ctrl|kb::Enter,sub {$_[0]-> split_line if !$_[0]-> {readOnly} && !$_[0]-> {wantReturns}}],
# block keys
			[ CancelBlock    => 0, 0, '@U',          q(cancel_block)],

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		autoIndent        => 1,
		autoHScroll       => 1,
		autoVScroll       => 1,
		blockType         => bt::CUA,
		borderWidth       => 1,
		cursorSize        => [ $::application-> get_default_cursor_width, $font-> { height}],
		cursorVisible     => 1,
		cursorX           => 0,
		cursorY           => 0,
		cursorWrap        => 0,
		insertMode        => 0,
		hiliteNumbers     => cl::Green,
		hiliteQStrings    => cl::LightBlue,
		hiliteQQStrings   => cl::LightBlue,
		hiliteIDs         => [[qw(

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	for ( qw( autoIndent topLine  offset resetDisabled blockType persistentBlock
		tabIndent readOnly wantReturns wantTabs
	))
		{ $self-> {$_} = 1; }
	for ( qw( wordWrap hScroll vScroll rows maxLineCount maxLineLength maxLineWidth
		scrollTransaction maxLine maxChunk capLen cursorY cursorX cursorWrap
		cursorXl cursorYl syntaxHilite hiliteNumbers hiliteQStrings hiliteQQStrings
		notifyChangeLock modified borderWidth autoHScroll autoVScroll blockShiftMark
	))
		{ $self-> {$_} = 0;}
	$self-> { insertMode}   = $::application-> insertMode;
	for ( qw( markers lines chunkMap hiliteIDs hiliteChars hiliteREs)) { $self-> {$_} = []}
	for ( qw( selStart selEnd selStartl selEndl)) { $self-> {$_} = [0,0]}
	$self-> {defcw} = $::application-> get_default_cursor_width;
	my %profile = $self-> SUPER::init(@_);
	$self-> setup_indents;
	$self-> {undo} = [];
	$self-> {redo} = [];
	$profile{selection} = [@{$profile{selStart}}, @{$profile{selEnd}}];
	for ( qw( hiliteNumbers hiliteQStrings hiliteQQStrings hiliteIDs hiliteChars hiliteREs
		autoHScroll autoVScroll
		textRef syntaxHilite autoIndent persistentBlock blockType hScroll vScroll borderWidth
		topLine  tabIndent readOnly offset wordDelimiters wantTabs wantReturns
		wordWrap cursorWrap markers undoLimit))
		{ $self-> $_( $profile{ $_}); }
	delete $self-> {resetDisabled};
	$self-> {uChange} = 0;
	$self-> reset;
	$self-> selection( @{$profile{selection}});
	for ( qw( cursorX cursorY))
	{ $self-> $_( $profile{ $_}); }
	$self-> reset_scrolls;
	$self-> {modified} = 0;

	$self-> {hiliteBlok_modified} = 0;

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$self-> {maxLine}  = scalar @{$self-> {lines}} - 1;
		$self-> {maxChunk} = $self-> {wordWrap} ? (scalar @{$self-> {chunkMap}}/3-1) : $self-> {maxLine};
		$self-> {yTail} = ( $yTail > 0) ? 1 : 0;
# updating selections
		$self-> selection( @{$self-> {selStart}}, @{$self-> {selEnd}});
# updating cursor
		$self-> cursor( $self-> cursor);
		my $chunk = $self-> get_chunk( $self-> {cursorYl});
		my $x     = $self-> {cursorXl};
		$self-> {cursorAtX}      = $self-> get_chunk_width( $chunk, 0, $x);
		$self-> {cursorInsWidth} = $self-> get_chunk_width( $chunk, $x, 1);
	}
# positioning cursor
	my $cx  = $a[0] + $self-> {cursorAtX} - $self-> {offset};
	my $cy  = $a[1] + $yTail + ($self-> {rows} - $self-> {cursorYl} + $self-> {topLine } - 1) * $fh;
	my $xcw = $self-> {insertMode} ? $cw : $self-> {cursorInsWidth};
	my $ycw = $fh;
	$ycw -= $a[1] - $cy, $cy = $a[1] if $cy < $a[1];
	$xcw = $size[0] + $a[0] - $cx - 1 if $cx + $xcw >= $size[0] + $a[0];
	$self-> cursorVisible( $xcw > 0);
	if ( $xcw > 0) {
		$self-> cursorPos( $cx, $cy);
		$self-> cursorSize( $xcw, $ycw);
	}
	$self-> {uChange} = 0;

}

#-------------------------------------------------------------------------------

sub reset_cursor
{
	my $self = $_[0];
	$self-> {uChange} = 2;
	$self-> reset;
	$self-> {uChange} = 0;

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	my ( $self, $btn, $mod, $x, $y) = @_;
	return if $self-> {mouseTransaction};
	return if $btn != mb::Left && $btn != mb::Middle;
	my @xy = $self-> point2xy( $x, $y);
	return unless $xy[2];
	$self-> cursor( @xy);

	if ( $btn == mb::Middle) {
		my $cp = $::application-> bring('Primary');
		return if !$cp || $self-> {readOnly};
		$self-> insert_text( $cp-> text, 0);

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		return unless $self-> scroll_timer_semaphore;
		$self-> scroll_timer_semaphore(0);
	}
	$self-> {delayPanning} = 1;
	$self-> blockShiftMark(1);
	$self-> cursor( @xy);
	$self-> blockShiftMark(0);
	$self-> update_block unless $self-> {mouseTransaction} == 2;
	$self-> realize_panning;
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		}
		return;
	}

	$self-> cancel_block;
	$self-> cursor( @xy);

	my $p = $xy[0];
	my $sl = length $s;
	my ($l,$r);

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

{
	my ( $self, $code, $key, $mod, $repeat) = @_;

#	$self->{hiliteBlok_modified} = 1;

#	my @cs = $self-> cursor;
#	my $curr_row  = $self->{topLine} + $cs[1];
#	my $blok_beg  = $self->{hiliteBlok}->[0];
#	my $blok_end  = $self->{hiliteBlok}->[1];

#	my ( $prev_type, $next_type ) = ( 0, 0 );

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN


		{	#wb:
			$self-> delete_block if $self-> has_selection;
		}

		my @cs = $self-> cursor;
		my $c  = $self-> get_line( $cs[1] );
		my $l = 0;

		$self-> begin_undo_group;
		if ( $self-> insertMode) {

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		}

#		$next_type =  1 if $self-> get_line( $cs[1] ) =~  /($blok_beg|blok_end)/;
#		$self-> area;

		$self-> cursor( $cs[0] + $repeat, $cs[1]);
		$self-> end_undo_group;
		$self-> clear_event;
	}
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	$self-> reset_scrolls;
	if ( !$self-> {resetDisabled}) {
		$self-> lock;
		$self-> selection(0,0,0,0);
		$self-> reset;
		$self-> cursor($self-> {cursorX}, $self-> {cursorY});
		$self-> unlock;
		$self-> notify(q(Change));
		$self-> reset_scrolls;
	}
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$_[0]-> $_( $_[0]-> {$c});
		delete $_[0]-> {$c};
	}
}

sub set_cursor
{
	my ( $self, $x, $y) = @_;
	my ( $ox, $oy) = ($self-> {cursorX}, $self-> {cursorY});
	my $maxY = $self-> {maxLine};
	$y = $maxY if $y < 0 || $y > $maxY;
	$y = 0 if $y < 0; # ??
	my $line = $self-> get_line( $y);
	$x = length( $line) if $x < 0;
	my ( $lx, $ly) = $self-> make_logical( $x, $y);
	my ( $olx, $oly) = ( $self-> {cursorXl}, $self-> {cursorYl});
	$self-> {cursorXl} = $lx;
	$self-> {cursorYl} = $ly;
	return if $y == $oy and $x == $ox and $lx == $olx and $ly == $oly;
	my ( $tl, $r, $yt) = ( $self-> {topLine }, $self-> {rows}, $self-> {yTail});
	if ( $ly < $tl) {
		$self-> topLine ( $ly);
	} elsif ( $ly >= $tl + $r) {

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		my $nofs = $atX - $actualWidth + $deltaX;
		$nofs = $ofs + $avg if $nofs - $ofs < $avg;
		$self-> offset( $nofs);
	}

	# check if last undo record contains cursor movements only, so these movements
	# can be grouped

	my $undo = 1;
	if ( !$self-> {undo_in_action} && @{$self-> {undo}} && @{$self-> {undo}-> [-1]}) {
		my $ok = 1;

		for ( @{$self-> {undo}-> [-1]}) {
			$ok = 0, last if $$_[0] ne 'cursor';
		}
		$undo = 0 if $ok;
	}

	$self-> push_undo_action( 'cursor', $self-> {cursorX}, $self-> {cursorY}) if $undo;
	$self-> {cursorX}        = $x;
	$self-> {cursorY}        = $y;
	$self-> {cursorAtX}      = $atX;
	$self-> {cursorInsWidth} = $deltaX;

	$self-> reset_cursor;
	$self-> cancel_block

		if !$self-> {blockShiftMark} && !$self-> {persistentBlock};

}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	if ( $self-> {vScroll} && $self-> {scrollTransaction} != 1) {
		$self-> {scrollTransaction} = 1;
		$self-> {vScrollBar}-> value( $tl);
		$self-> {scrollTransaction} = 0;
	}
	$self-> reset_cursor;
	$self-> scroll( 0, $dt * ($self-> font-> height + $self->{lineSpace}),
		clipRect => [ $self-> get_active_area]);
}

sub reset_indents

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

sub set_insert_mode
{
	my ( $self, $insert) = @_;
	my $oi = $self-> {insertMode};
	$self-> {insertMode} = $insert;
	$self-> reset_cursor if $oi != $insert;
	$::application-> insertMode( $insert);
	$self-> push_group_undo_action( 'insertMode', $oi) if $oi != $insert;
}

#-------------------------------------------------------------------------------

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	if ( $self-> {hScroll} && $self-> {scrollTransaction} != 2) {
		$self-> {scrollTransaction} = 2;
		$self-> {hScrollBar}-> value( $offset);
		$self-> {scrollTransaction} = 0;
	}
	$self-> reset_cursor;
	$self-> scroll( -$dt, 0,
		clipRect => [ $self-> get_active_area]);
}

#-------------------------------------------------------------------------------

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	return if $self-> {readOnly};
	return if !defined($s) or length( $s) == 0;

	$self-> begin_undo_group;
	$self-> cancel_block unless $self-> {blockType} == bt::CUA;
	my @cs = $self-> cursor;
	my @xy = @cs;

	my @ln = split( "\n", $s, -1);
#	my $zzz = join '|', @ln;
#print "<|$zzz|>$cs[1]\n";
#	pop @ln unless length $ln[-1];
	$s = $self-> get_line( $cs[1]);

#cursor position shift to end of the line if is greater than it:
	$cs[0] = length( $s) if $cs[0] > length( $s);

	my $cl = $cs[0] - length( $s);
#	$s .= ' 'x$cl if $cl > 0;
#	$cl = 0 if $cl < 0;

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	$self-> lock_change(0);
	$self-> end_undo_group;

	$self-> area( $self->{topLine}, $self->{rows} ) if @{$self->{hiliteBlok}};

	$self-> cursor( @xy );
}

sub insert_text_orig
{
	my ( $self, $s, $hilite) = @_;
	return if !defined($s) or length( $s) == 0;
	$self-> begin_undo_group;
	$self-> cancel_block unless $self-> {blockType} == bt::CUA;
	my @cs = $self-> cursor;
	my @ln = split( "\n", $s, -1);
	pop @ln unless length $ln[-1];
	$s = $self-> get_line( $cs[1]);
	my $cl = $cs[0] - length( $s);
	$s .= ' 'x$cl if $cl > 0;

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	my $self = $_[0];
	return if exists $self-> {anchor};
	my $blockType = $_[1] || $self-> {blockType};
	$self-> selection(0,0,0,0);
	$self-> blockType( $blockType);
	$self-> {anchor} = [ $self-> {cursorX}, $self-> {cursorY}];
}

sub update_block
{
	my $self = $_[0];
	return unless exists $self-> {anchor};
	$self-> selection( @{$self-> {anchor}}, $self-> {cursorX}, $self-> {cursorY});
}

sub end_block
{
	my $self = $_[0];
	return unless exists $self-> {anchor};
	my @anchor = @{$self-> {anchor}};
	delete $self-> {anchor};
	$self-> selection( @anchor, $self-> {cursorX}, $self-> {cursorY});
}

sub cancel_block
{
	delete $_[0]-> {anchor};

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$res++;
	}
	return $res;
}

sub cursor_down
{
	my $d = $_[1] || 1;
#print "cursor_down\n";
	my $l1 = $_[0]->get_line( $_[0]-> {cursorYl} );
	my $l2 = $_[0]->get_line( $_[0]-> {cursorYl} + $d );

	($l1,undef) = wstaw_tab_15( $l1, 0, $_[0]-> {cursorX}, '', 0 );
	my $len2 = kursor_w_dol( $l2,length($l1));
	$_[0]-> cursorLog( $len2, $_[0]-> {cursorYl} + $d);

	$_[0]-> area( $_[0]->{topLine}, $_[0]->{rows} ) if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
}

sub cursor_up
{
#print "cursor_up\n";
	return if $_[0]-> {cursorYl} == 0;

	my $d = $_[1] || 1;

	my $l1 = $_[0]->get_line( $_[0]-> {cursorYl} );
	my $l2 = $_[0]->get_line( $_[0]-> {cursorYl} - $d );
	($l1,undef) = wstaw_tab_15( $l1, 0, $_[0]-> {cursorX}, '', 0 );
	my $len2 = kursor_w_dol( $l2,length($l1));

	my ( $x, $y) = $_[0]-> make_physical( $len2, $_[0]-> {cursorYl} - $d);
#	my ( $x, $y) = $_[0]-> make_physical( $_[0]-> {cursorXl}, $_[0]-> {cursorYl} - $d);
	$y = 0 if $y < 0;
	$_[0]-> cursor( $x, $y);

	$_[0]-> area( $_[0]->{topLine}, $_[0]->{rows} ) if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
}

sub cursor_left
{
	my $d = $_[1] || 1;
	my $x = $_[0]-> cursorX;
	if ( $x - $d >= 0) {
		$_[0]-> cursorX( $x - $d)
	} elsif ( $_[0]-> {cursorWrap}) {
		if ( $d == 1) {
			my $y = $_[0]-> cursorY - 1;
			$_[0]-> cursor( -1, $y < 0 ? 0 : $y);
		} else {
			$_[0]-> cursor_left( $d - 1);
		}
	} else {
		$_[0]-> cursorX( 0);
	}
}

sub cursor_right
{
	my $d = $_[1] || 1;
	my $x = $_[0]-> cursorX;
	if ( $_[0]-> {cursorWrap} || $_[0]-> {wordWrap}) {
		my $y = $_[0]-> cursorY;
		if ( $x + $d > length( $_[0]-> get_line( $y))) {
			if ( $d == 1) {
				$_[0]-> cursor( 0, $y + 1) if $y < $_[0]-> {maxLine};
			} else {
				$_[0]-> cursor_right( $d - 1);
			}
		} else {
			$_[0]-> cursorX( $x + $d);
		}
	} else {
		$_[0]-> cursorX( $x + $d);
	}
}

sub cursor_home
{
	my ($spaces) = ($_[0]-> get_line( $_[0]-> cursorY) =~ /^([s\t]*)/);
	$_[0]-> begin_undo_group;
	$_[0]-> offset(0);
	$_[0]-> cursorX(0);
	$_[0]-> end_undo_group;
}

sub cursor_end
{
	my ($nonspaces) = ($_[0]-> get_line( $_[0]-> cursorY) =~ /^(.*?)[\s\t]*$/);
	$_[0]-> cursorX( length $nonspaces);

}

sub cursor_cend  {
	$_[0]-> cursor( 0, -1 );
	$_[0]-> cursor_end;
#print "cursor_cend\n";

	$_[0]-> area if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
}

sub cursor_chome {
	$_[0]-> cursor( 0,  0 );
#print "cursor_chome\n";

	$_[0]-> area if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
}
#----------------------------------------------
sub cursor_cpgup
{
	my @xy = (0,0);
#print "cursor_cpgup\n";
	if ( $_[0]->{cursorYl} > $_[0]->topLine ) {
		@xy = ( $_[0]-> {cursorXl}, $_[0]->topLine );
	}
	$_[0]-> cursorLog( @xy );

	$_[0]-> area if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
}
#----------------------------------------------
sub cursor_cpgdn
{
	my @xy = ( 0, -1 );
#print "cursor_cpgdn\n";
	if ( $_[0]->{cursorYl} < $_[0]->topLine + $_[0]->{rows} - 1 ) {
		@xy = ( $_[0]-> {cursorXl}, $_[0]->topLine + $_[0]->{rows} - 1 );
	}
	$_[0]-> cursorLog( @xy );

	$_[0]-> area if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};

#	my $cy = $_[0]->{cursorYl} == $_[0]->topLine + $_[0]->{rows} - 1 ? 0 : $_[0]->topLine + $_[0]->{rows};
#	$_[0]-> cursorLog( $_[0]-> {cursorXl}, $cy - 1 );
}
#----------------------------------------------
sub cursor_pgup
{
	my $d = $_[1] || 1;
	my $i;
	my @xy = $_[0]->cursor;
	for ( $i = 0; $i < $d; $i++) {
		my ( $tl, $r) = ($_[0]-> topLine , $_[0]-> {rows} );

		my $cy = $tl - $r;

		$_[0]-> cursorLog( $_[0]-> {cursorXl}, $cy < 0 ? 0 : $cy);
		$_[0]-> cursorLog( $_[0]-> {cursorXl}, $xy[1] < $r ? 0 : $xy[1] - $r  );

		$_[0]-> area( $_[0]->{topLine}, $_[0]->{rows} ) if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
	}
}
#----------------------------------------------

sub cursor_pgdn  {
	my $d = $_[1] || 1;
	my $i;
	my @xy = $_[0]->cursor;
	for ( $i = 0; $i < $d; $i++) {
		my ( $tl, $r) = ($_[0]-> topLine , $_[0]-> {rows} - 1);

		my $cy = $tl + 2*$r + 1;

		$_[0]-> cursorLog( $_[0]-> {cursorXl}, $cy);
		$_[0]-> cursorLog( $_[0]-> {cursorXl}, $xy[1] + $r + 1 );

		$_[0]-> area( $_[0]->{topLine}, $_[0]->{rows} ) if $_[0]-> {hiliteBlok_modified} && @{$_[0]->{hiliteBlok}};
	}
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	my $d = $_[1] || 1;
	my $i;
	for ( $i = 0; $i < $d; $i++) {
		my ( $x, $y, $w, $delta, $maxY) = (

			$self-> cursorX, $self-> cursorY,

			$self-> wordDelimiters, 0, $self-> {maxLine}
		);
		my $line  = $self-> get_line( $y);
		my $clen  = length( $line);
		if ($self-> {cursorWrap}) {
			while ( $x >= $clen) {
				$y++;
				return if $y > $maxY;
				$x = 0;
				$line = $self-> get_line( $y);

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		}
		if ( $x + $delta < $clen) {
			$delta++ while ( $w =~ quotemeta substr $line, $x + $delta, 1) &&
				$x + $delta < $clen;
		}
		$self-> cursor( $x + $delta, $y);
	}
}

sub word_left
{
	my $self = $_[0];
	my $d = $_[1] || 1;
	my $i;
	for ( $i= 0;$i<$d; $i++) {
		my ( $x, $y, $w, $delta) =
			( $self-> cursorX, $self-> cursorY, $self-> wordDelimiters, 0);
		my $line = $self-> get_line( $y);
		my $clen = length( $line);
		if ($self-> {cursorWrap}) {
			while ( $x == 0) {
				$y--;
				$y = 0, last if $y < 0;
				$line = $self-> get_line( $y);
				$x = $clen = length( $line);

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		if ( $x + $delta > 0)
		{
			$delta-- while (!( $w =~ quotemeta( substr( $line, $x + $delta - 1, 1))) &&
				( $x + $delta > 0))
		}
		$self-> cursor( $x + $delta, $y);
	}
}

sub cursor_shift_key
{
	my ( $self, $menuItem) = @_;
	$self-> begin_undo_group;
	$self-> start_block unless exists $self-> {anchor};
	$menuItem =~ s/Shift//;

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

	$action = $self-> can( $action, 0) unless ref $action;
	$self-> {delayPanning} = 1;
	$self-> blockShiftMark(1);
	$action-> ( @_);
	$self-> blockShiftMark(0);
	$self-> selection( @{$self-> {anchor}}, $self-> {cursorX}, $self-> {cursorY});
	$self-> realize_panning;
	$self-> end_undo_group;
}

sub blockShiftMark

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$self-> blockType( bt::Vertical);
		$self-> {restorePersistentBlock} = 1

			unless $self-> persistentBlock;
		$self-> persistentBlock( 1);
		$self-> cursor_shift_key(q(ShiftCursorRight));
	}
}

sub mark_horizontal
{

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$self-> {restorePersistentBlock} = 1 unless $self-> persistentBlock;
		$self-> persistentBlock( 1);
		$self-> start_block;
		$self-> selection(

			$self-> make_physical( 0, $self-> {cursorYl}),
			$self-> make_physical( -1, $self-> {cursorYl})
		);
	}
}

sub set_line

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

			$a[2], $a[3] - $fh * ( $_from - $tl)
		);
	} else {
		$self-> repaint;
	}
	$self-> cursor( $self-> cursor);
	$self-> end_undo_group;
	$self-> notify(q(Change)) unless $self-> {notifyChangeLock};

}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

				) if $self-> {hScroll};
				last;
			}
		}
	}
	$self-> cursor( $self-> cursor);
	$self-> end_undo_group;
	$self-> repaint;
	$self-> notify(q(Change)) unless $self-> {notifyChangeLock};
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		substr( $c, 0, $end) = '';
		$self-> set_line( $pey, $c, q(delete), 0,  $end);
		$ey--;
	}
	$self-> delete_line( $sy, $ey - $sy + 1) if $ey >= $sy;
	$self-> cursor( $self-> {cursorX}, $psy);
	$self-> unlock;
	$self-> lock_change(0);
	$self-> end_undo_group;
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

}

sub delete_char
{
	my $self = $_[0];
	$self-> delete_text( $self-> cursor, $_[1] || 1);
}

sub back_char
{
	my $self = $_[0];

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$self-> delete_block;
		return;
	}
}

	my @c = $self-> cursor;
	my $d = $_[1] || 1;

	$self-> begin_undo_group;
	if ( $c[0] >= $d) {
		$self-> delete_text( $c[0] - $d, $c[1], $d);
		$self-> cursorX( $c[0] - $d);
	} elsif ( $c[1] > 0) {
		$self-> cursor( -1, $c[1] - 1);
		$self-> delete_text( -1, $c[1] - 1);
	}
	$self-> end_undo_group;
}

sub delete_current_chunk
{
	my $self = $_[0];
	$self-> delete_chunk( $self-> {cursorYl});
}

sub delete_to_end
{
	my $self = $_[0];
	my @cs = $self-> cursor;
	my $c = $self-> get_line( $cs[1]);
	return if $cs[ 0] > length( $c);

	$self-> set_line( $cs[1], substr( $c, 0, $cs[0]), q(delete), $cs[0], length( $c) - $cs[0]);
}

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		}
		$self-> unlock;
		$self-> lock_change(0);
	}

	$self-> cursorLog( $sel[0], $sel[1]);
	$self-> cancel_block;
	$self-> end_undo_group;
}

sub copy_block

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		my $i;
		for ( $i = $sel[1]; $i <= $sel[3]; $i++) {

			push @lines, $self-> get_line( $i);
		}
		$self-> insert_line( $self-> cursorY, @lines);
	} else {
		my @lines;
		my $i;
		for ( $i = $sel[1]; $i <= $sel[3]; $i++) {
			my $c = $self-> get_line( $i);
			$c .= ' ' x ($sel[2]-length($c))

				if length($c) < $sel[2];
			push( @lines, substr( $c, $sel[0], $sel[2]-$sel[0]));
		}
		my @cs = $self-> cursor;
		for ( $i = $cs[1]; $i < $cs[1] + scalar @lines; $i++) {
			my $c = $self-> get_line( $i);
			$c .= ' 'x($cs[0]-length($c)) if length($c) < $cs[0];
			substr( $c, $cs[0], 0) = $lines[ $i - $cs[1]];
			$self-> set_line( $i, $c);

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		for ( $i = $sel[1]; $i <= $sel[3]; $i++) {
			my $c = $self-> get_line( $i);
			$c .= ' ' x ($sel[2]-length($c)) if length($c) < $sel[2];
			push( @lines, substr( $c, $sel[0], $sel[2]-$sel[0]));
		}
		my @cs = $self-> cursor;
		my $bx = $sel[3] - $sel[1] + 1;
		for ( $i = $cs[1]; $i < $cs[1] + scalar @lines; $i++) {
			my $c = $self-> get_line( $i);
			$c .= ' ' x ($cs[0]-length($c))

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

}

sub split_line
{
	my $self = $_[0];
	my @cs = $self-> cursor;
	my $c = $self-> get_line( $cs[1]);
	$c .= ' 'x($cs[0]-length($c)) if length($c) < $cs[0];
	my ( $old, $new) = ( substr( $c, 0, $cs[0]), substr( $c, $cs[0], length( $c) - $cs[0]));
	$self-> lock_change(1);
	$self-> begin_undo_group;

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN

		$new = $add.$new, $cshift = length( $add)

			if length( $add) < length( $old);
	}
	$self-> insert_line( $cs[1]+1, $new);
	$self-> cursor( $cshift, $cs[1] + 1);
	$self-> end_undo_group;
	$self-> lock_change(0);
}

sub begin_undo_group

lib/Prima/CodeManager/Edit.pm  view on Meta::CPAN


sub select_all { $_[0]-> selection(0,0,-1,-1); }

sub autoIndent      {($#_)?($_[0]-> {autoIndent}    = $_[1])                :return $_[0]-> {autoIndent }  }
sub blockType       {($#_)?($_[0]-> set_block_type  ( $_[1]))               :return $_[0]-> {blockType}    }
sub cursor          {($#_)?($_[0]-> set_cursor    ($_[1],$_[2]))            :return $_[0]-> {cursorX},$_[0]-> {cursorY}}
sub cursorLog       {($#_)?($_[0]-> set_cursor    ($_[0]-> make_physical($_[1],$_[2])))            :return $_[0]-> {cursorXl},$_[0]-> {cursorYl}}
sub cursorX         {($#_)?($_[0]-> set_cursor    ($_[1],$_[0]-> {cursorY})):return $_[0]-> {cursorX}    }
sub cursorY         {($#_)?($_[0]-> set_cursor    ($_[0]-> {q(cursorX)},$_[1])):return $_[0]-> {cursorY}    }
sub cursorWrap      {($#_)?($_[0]-> {cursorWrap     }=$_[1])                :return $_[0]-> {cursorWrap     }}
sub topLine         {($#_)?($_[0]-> set_top_line (   $_[1]))               :return $_[0]-> {topLine }    }
sub hiliteNumbers   {($#_)?$_[0]-> set_hilite_numbers ($_[1])               :return $_[0]-> {hiliteNumbers} }
sub hiliteQStrings  {($#_)?$_[0]-> set_hilite_q_strings($_[1])              :return $_[0]-> {hiliteQStrings} }
sub hiliteQQStrings {($#_)?$_[0]-> set_hilite_qq_strings($_[1])             :return $_[0]-> {hiliteQQStrings} }
sub hiliteChars     {($#_)?$_[0]-> set_hilite_chars     ($_[1])             :return $_[0]-> {hiliteChars    } }

 view all matches for this distribution


Cog

 view release on metacpan or  search on metacpan

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

	},

	_mouseMove: function(event) {
		// Only check for mouseups outside the document if you've moved inside the document
		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
		// fire a mousemove event if content is placed under the cursor. See #7778
		// Support: IE <9
		if ( this._mouseMoved ) {
			// IE mouseup check - mouseup happened when mouse was out of window
			if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
				return this._mouseUp(event);

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN


	_keyEvent: function( keyEvent, event ) {
		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
			this._move( keyEvent, event );

			// prevents moving cursor to beginning/end of the text field in some browsers
			event.preventDefault();
		}
	}
});

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		nodeName = target.nodeName.toLowerCase();
		if (nodeName === "input") {
			target.disabled = false;
			inst.trigger.filter("button").
				each(function() { this.disabled = false; }).end().
				filter("img").css({opacity: "1.0", cursor: ""});
		} else if (nodeName === "div" || nodeName === "span") {
			inline = $target.children("." + this._inlineClass);
			inline.children().removeClass("ui-state-disabled");
			inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
				prop("disabled", false);

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		nodeName = target.nodeName.toLowerCase();
		if (nodeName === "input") {
			target.disabled = true;
			inst.trigger.filter("button").
				each(function() { this.disabled = true; }).end().
				filter("img").css({opacity: "0.5", cursor: "default"});
		} else if (nodeName === "div" || nodeName === "span") {
			inline = $target.children("." + this._inlineClass);
			inline.children().addClass("ui-state-disabled");
			inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
				prop("disabled", true);

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN


		inst.lastVal = null;
		$.datepicker._lastInput = input;
		$.datepicker._setDateFromField(inst);

		if ($.datepicker._inDialog) { // hide cursor
			input.value = "";
		}
		if (!$.datepicker._pos) { // position below input
			$.datepicker._pos = $.datepicker._findPos(input);
			$.datepicker._pos[1] += input.offsetHeight; // add the height

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		addClasses: true,
		appendTo: "parent",
		axis: false,
		connectToSortable: false,
		containment: false,
		cursor: "auto",
		cursorAt: false,
		grid: false,
		handle: false,
		helper: "original",
		iframeFix: false,
		opacity: false,

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		//Generate the original position
		this.originalPosition = this.position = this._generatePosition( event, false );
		this.originalPageX = event.pageX;
		this.originalPageY = event.pageY;

		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));

		//Set a containment if given in the options
		this._setContainment();

		//Trigger event + callbacks

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

			}
		});
	}
});

$.ui.plugin.add("draggable", "cursor", {
	start: function( event, ui, instance ) {
		var t = $( "body" ),
			o = instance.options;

		if (t.css("cursor")) {
			o._cursor = t.css("cursor");
		}
		t.css("cursor", o.cursor);
	},
	stop: function( event, ui, instance ) {
		var o = instance.options;
		if (o._cursor) {
			$("body").css("cursor", o._cursor);
		}
	}
});

$.ui.plugin.add("draggable", "opacity", {

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		return !this.options.disabled && capture;
	},

	_mouseStart: function(event) {

		var curleft, curtop, cursor,
			o = this.options,
			el = this.element;

		this.resizing = true;

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN


		this.aspectRatio = (typeof o.aspectRatio === "number") ?
			o.aspectRatio :
			((this.originalSize.width / this.originalSize.height) || 1);

		cursor = $(".ui-resizable-" + this.axis).css("cursor");
		$("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);

		el.addClass("ui-resizable-resizing");
		this._propagate("start", event);
		return true;
	},

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

			if (this._helper && !o.animate) {
				this._proportionallyResize();
			}
		}

		$("body").css("cursor", "auto");

		this.element.removeClass("ui-resizable-resizing");

		this._propagate("stop", event);

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

	options: {
		appendTo: "parent",
		axis: false,
		connectWith: false,
		containment: false,
		cursor: "auto",
		cursorAt: false,
		dropOnEmpty: true,
		forcePlaceholderSize: false,
		forceHelperSize: false,
		grid: false,
		handle: false,

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		//Generate the original position
		this.originalPosition = this._generatePosition(event);
		this.originalPageX = event.pageX;
		this.originalPageY = event.pageY;

		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));

		//Cache the former DOM position
		this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };

		//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

		//Set a containment if given in the options
		if(o.containment) {
			this._setContainment();
		}

		if( o.cursor && o.cursor !== "auto" ) { // cursor option
			body = this.document.find( "body" );

			// support: IE
			this.storedCursor = body.css( "cursor" );
			body.css( "cursor", o.cursor );

			this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
		}

		if(o.opacity) { // opacity option
			if (this.helper.css("opacity")) {
				this._storedOpacity = this.helper.css("opacity");

share/js/jquery-ui-1.11.4.js  view on Meta::CPAN

			}
		}

		//Do what was originally in plugins
		if ( this.storedCursor ) {
			this.document.find( "body" ).css( "cursor", this.storedCursor );
			this.storedStylesheet.remove();
		}
		if(this._storedOpacity) {
			this.helper.css("opacity", this._storedOpacity);
		}

 view all matches for this distribution


Collectd-Plugins-Amavis

 view release on metacpan or  search on metacpan

lib/Collectd/Plugins/Amavis.pm  view on Meta::CPAN

  my $db = BerkeleyDB::Hash->new(
    -Filename => $db_file,
    -Env => $env
  ) or die "could not open db: $!";

  my $cursor = $db->db_cursor;

  my ( $key, $val ) = ('','');
  while ( $cursor->c_get($key,$val,DB_NEXT) == 0 ) {
    if( $val !~ s/^(?:C32|C64|INT) //) {
      next;
    }
    $val = int( $val );
    $key =~ s/([a-z])([A-Z])/$1_$2/g;

 view all matches for this distribution


Complete-Bash

 view release on metacpan or  search on metacpan

lib/Complete/Bash.pm  view on Meta::CPAN

    v => 1.1,
    summary => 'Return line with point marked by a marker',
    description => <<'_',

This is a utility function useful for testing/debugging. `parse_cmdline()`
expects a command-line and a cursor position (`$line`, `$point`). This routine
expects `$line` with a marker character (by default it's the caret, `^`) and
return (`$line`, `$point`) to feed to `parse_cmdline()`.

Example:

lib/Complete/Bash.pm  view on Meta::CPAN

            description => <<'_',

Optional. Known options:

* `truncate_current_word` (bool). If set to 1, will truncate current word to the
  position of cursor, for example (`^` marks the position of cursor):
  `--vers^oo` to `--vers` instead of `--versoo`. This is more convenient when
  doing tab completion.

_
            schema => 'hash*',

lib/Complete/Bash.pm  view on Meta::CPAN

    # this is a workaround. since bash breaks words using characters in
    # $COMP_WORDBREAKS, which by default is "'@><=;|&(: this presents a problem
    # we often encounter: if we want to provide with a list of strings
    # containing say ':', most often Perl modules/packages, if user types e.g.
    # "Text::AN" and we provide completion ["Text::ANSI"] then bash will change
    # the word at cursor to become "Text::Text::ANSI" since it sees the current
    # word as "AN" and not "Text::AN". the workaround is to chop /^Text::/ from
    # completion answers. btw, we actually chop /^text::/i to handle
    # case-insensitive matching, although this does not have the ability to
    # replace the current word (e.g. if we type 'text::an' then bash can only
    # replace the current word 'an' with 'ANSI).

lib/Complete/Bash.pm  view on Meta::CPAN

 % somecmd t<Tab>
 two  three

Another source is from a bash function (C<-F>). The function will receive input
in two variables: C<COMP_WORDS> (array, command-line chopped into words) and
C<COMP_CWORD> (integer, index to the array of words indicating the cursor
position). It must set an array variable C<COMPREPLY> that contains the list of
possible completion:

 % _foo()
 {

lib/Complete/Bash.pm  view on Meta::CPAN

 % foo <Tab>
 --help  --verbose  --version

And yet another source is an external command (C<-C>) including, from a Perl
script. The command receives two environment variables: C<COMP_LINE> (string,
raw command-line) and C<COMP_POINT> (integer, cursor location). Program must
split C<COMP_LINE> into words, find the word to be completed, complete that, and
return the list of words one per-line to STDOUT. An example:

 % cat foo-complete
 #!/usr/bin/perl

lib/Complete/Bash.pm  view on Meta::CPAN

Optional. Known options:

=over

=item * C<truncate_current_word> (bool). If set to 1, will truncate current word to the
position of cursor, for example (C<^> marks the position of cursor):
C<--vers^oo> to C<--vers> instead of C<--versoo>. This is more convenient when
doing tab completion.

=back

lib/Complete/Bash.pm  view on Meta::CPAN

 point($cmdline, $marker) -> any

Return line with point marked by a marker.

This is a utility function useful for testing/debugging. C<parse_cmdline()>
expects a command-line and a cursor position (C<$line>, C<$point>). This routine
expects C<$line> with a marker character (by default it's the caret, C<^>) and
return (C<$line>, C<$point>) to feed to C<parse_cmdline()>.

Example:

 view all matches for this distribution


Complete-Getopt-Long

 view release on metacpan or  search on metacpan

lib/Complete/Getopt/Long.pm  view on Meta::CPAN

single dash will be completed. For example if you have `-foo=s` in your option
specification, `-f<tab>` can complete it.

This can be used to complete old-style programs, e.g. emacs which has options
like `-nw`, `-nbc` etc (but also have double-dash options like
`--no-window-system` or `--no-blinking-cursor`).

_
        },
    },
    result_naked => 1,

lib/Complete/Getopt/Long.pm  view on Meta::CPAN

single dash will be completed. For example if you have C<-foo=s> in your option
specification, C<< -fE<lt>tabE<gt> >> can complete it.

This can be used to complete old-style programs, e.g. emacs which has options
like C<-nw>, C<-nbc> etc (but also have double-dash options like
C<--no-window-system> or C<--no-blinking-cursor>).

=item * B<completion> => I<code>

Completion routine to complete option valueE<sol>argument.

 view all matches for this distribution


Compress-Deflate7

 view release on metacpan or  search on metacpan

7zip/CPP/7zip/UI/FileManager/BrowseDialog.cpp  view on Meta::CPAN

    Path += WCHAR_PATH_SEPARATOR;

  LVITEMW item;

  int index = 0;
  int cursorIndex = -1;

  #ifndef _SFX
  if (_showDots)
  {
    UString itemName = L"..";
    item.iItem = index;
    if (selectedName.IsEmpty())
      cursorIndex = item.iItem;
    item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
    int subItem = 0;
    item.iSubItem = subItem++;
    item.lParam = kParentIndex;
    item.pszText = (wchar_t *)(const wchar_t *)itemName;

7zip/CPP/7zip/UI/FileManager/BrowseDialog.cpp  view on Meta::CPAN

  for (int i = 0; i < _files.Size(); i++)
  {
    const CFileInfoW &fi = _files[i];
    item.iItem = index;
    if (fi.Name.CompareNoCase(selectedName) == 0)
      cursorIndex = item.iItem;
    item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
    int subItem = 0;
    item.iSubItem = subItem++;
    item.lParam = i;
    item.pszText = (wchar_t *)(const wchar_t *)fi.Name;

7zip/CPP/7zip/UI/FileManager/BrowseDialog.cpp  view on Meta::CPAN

      _list.SetSubItem(index, subItem++, s);
    }
    index++;
  }

  if (_list.GetItemCount() > 0 && cursorIndex >= 0)
    _list.SetItemState_FocusedSelected(cursorIndex);
  _list.SortItems(CompareItems2, (LPARAM)this);
  if (_list.GetItemCount() > 0 && cursorIndex < 0)
    _list.SetItemState(0, LVIS_FOCUSED, LVIS_FOCUSED);
  _list.EnsureVisible(_list.GetFocusedItem(), false);
  _list.SetRedraw(true);
  return S_OK;
}

 view all matches for this distribution


Compress-Stream-Zstd

 view release on metacpan or  search on metacpan

ext/zstd/lib/dictBuilder/zdict.c  view on Meta::CPAN

    }

    DISPLAYLEVEL(2, "finding patterns ... \n");
    DISPLAYLEVEL(3, "minimum ratio : %u \n", minRatio);

    {   U32 cursor; for (cursor=0; cursor < bufferSize; ) {
            dictItem solution;
            if (doneMarks[cursor]) { cursor++; continue; }
            solution = ZDICT_analyzePos(doneMarks, suffix, reverseSuffix[cursor], buffer, minRatio, notificationLevel);
            if (solution.length==0) { cursor++; continue; }
            ZDICT_insertDictItem(dictList, dictListSize, solution, buffer);
            cursor += solution.length;
            DISPLAYUPDATE(2, "\r%4.2f %% \r", (double)cursor / (double)bufferSize * 100.0);
    }   }

_cleanup:
    free(suffix0);
    free(reverseSuffix);

 view all matches for this distribution


Compress-Zstd

 view release on metacpan or  search on metacpan

ext/zstd/lib/dictBuilder/zdict.c  view on Meta::CPAN

    }

    DISPLAYLEVEL(2, "finding patterns ... \n");
    DISPLAYLEVEL(3, "minimum ratio : %u \n", minRatio);

    {   U32 cursor; for (cursor=0; cursor < bufferSize; ) {
            dictItem solution;
            if (doneMarks[cursor]) { cursor++; continue; }
            solution = ZDICT_analyzePos(doneMarks, suffix, reverseSuffix[cursor], buffer, minRatio, notificationLevel);
            if (solution.length==0) { cursor++; continue; }
            ZDICT_insertDictItem(dictList, dictListSize, solution, buffer);
            cursor += solution.length;
            DISPLAYUPDATE(2, "\r%4.2f %% \r", (double)cursor / bufferSize * 100);
    }   }

_cleanup:
    free(suffix0);
    free(reverseSuffix);

 view all matches for this distribution


Config-Abstraction

 view release on metacpan or  search on metacpan

scripts/generate_index.pl  view on Meta::CPAN

		.med { background-color: #ffd; }
		.high { background-color: #dfd; }
		.badges img { margin-right: 10px; }
		.disabled-icon {
			opacity: 0.4;
			cursor: default;
		}
		.icon-link {
			text-decoration: none;
		}
		.icon-link:hover {
			opacity: 0.7;
			cursor: pointer;
		}
		.coverage-badge {
			padding: 2px 6px;
			border-radius: 4px;
			font-weight: bold;

scripts/generate_index.pl  view on Meta::CPAN

			background-color: #f0f0f0;
		}
		td.positive { color: green; font-weight: bold; }
		td.negative { color: red; font-weight: bold; }
		td.neutral { color: gray; }
		// Show cursor points on the headers to show that they are clickable
		th { background-color: #f2f2f2; cursor: pointer; }
		th.sortable {
			cursor: pointer;
			user-select: none;
			white-space: nowrap;
		}
		th .arrow {
			color: #aaa;	/* dimmed for inactive */

 view all matches for this distribution


Config-Augeas-Validator

 view release on metacpan or  search on metacpan

lib/Config/Augeas/Validator.pm  view on Meta::CPAN

sub play {
   my ($self, @infiles) = @_;

   my @files;
   if ($self->{recurse}) {
      printf "\033[?25l"; # hide cursor
      print colored ("I: Recursively analyzing directories ", COLOR_INFO) unless $self->{quiet};
      find sub {
         my $exclude = $self->{exclude};
         $exclude ||= '^$';
         push @files, $File::Find::name
            if(-e && $File::Find::name !~ /^$exclude$/);
         $self->tick unless $self->{quiet}
         }, @infiles;
      print colored("[done]", COLOR_OK),"\n" unless $self->{quiet};
      printf "\033[?25h"; # restore cursor
   } elsif ($#infiles < 0) {
      @files = $self->get_all_files();
      $self->{syswide} = 1;
   }else {
      @files = @infiles;

 view all matches for this distribution


Config-Model-LcdProc

 view release on metacpan or  search on metacpan

lib/Config/Model/models/LCDd/EyeboxOne.pl  view on Meta::CPAN

        'upstream_default' => 'yes',
        'value_type' => 'uniline'
      },
      'Cursor',
      {
        'description' => 'Switch on the cursor? ',
        'type' => 'leaf',
        'upstream_default' => 'no',
        'value_type' => 'uniline'
      },
      'Device',

 view all matches for this distribution


Config-Model-TkUI

 view release on metacpan or  search on metacpan

lib/Config/Model/TkUI.pm  view on Meta::CPAN

        -tree_width  => [ 'METHOD',  undef,        undef,        80 ],
        -tree_height => [ 'METHOD',  undef,        undef,        30 ],
        -width       => [ $eh_frame, qw/width Width 1280/ ],
        -height      => [ $eh_frame, qw/height Height 1024/ ],
        -selectmode  => [ $tree,     'selectMode', 'SelectMode', 'single' ],    #single',
                #-oldcursor => [$hlist, undef, undef, undef],
        DEFAULT => [$tree] );

    $cw->Advertise( tree        => $tree );
    $cw->Advertise( menubar     => $menubar );
    $cw->Advertise( history     => $history_menu );

 view all matches for this distribution


Config-Model-Xorg

 view release on metacpan or  search on metacpan

lib/Config/Model/models/Xorg/Device/Fglrx.pl  view on Meta::CPAN

      {
        'choice' => [
          'on',
          'off'
        ],
        'description' => 'Enable or disable the hardware cursor to be updated asynchronously by the signal handler associated with mouse events. The default is: "on".',
        'type' => 'leaf',
        'value_type' => 'enum'
      },
      'Stereo',
      {

lib/Config/Model/models/Xorg/Device/Fglrx.pl  view on Meta::CPAN

      {
        'choice' => [
          'on',
          'off'
        ],
        'description' => 'Disable or enable the use of a software cursor. The default is: "off".',
        'type' => 'leaf',
        'value_type' => 'enum'
      },
      'TMDSCoherentMode',
      {

 view all matches for this distribution


Console-ProgressBar

 view release on metacpan or  search on metacpan

lib/Console/ProgressBar.pm  view on Meta::CPAN


    # create a progress bar for a task with 20 steps
    my $p = Console::ProgressBar->new('Writing files',20);

    # for each step done, the progress bar index is incremented
    # and the progress bar is displayed at the current cursor position
    for(my $i=1; $i <= 20; $i++) {
        $p->next()->render();
    }

The progress bar displays a title that describe the task and the percentage of completion.

 view all matches for this distribution


Convert-ASCIInames

 view release on metacpan or  search on metacpan

lib/Convert/ASCIInames.pm  view on Meta::CPAN


Some of these special purposes have become obsolete, but some of them
are still in use.  For example, character 0x07 (C<BEL>) is used to
ring the feeper; 0x05 (C<ENQ>) is recognised by many terminals as
a trigger to report their status; and 0x08 (C<BS>) still means
"move the cursor back one space".

This module will return the ASCII name for specified characters,
or the character code if given an ASCII name.  In addition, the
full descriptive name ("Start of Heading" instead of C<SOH>) is
available, although reverse translation of the descriptions isn't

 view all matches for this distribution


Convert-Pheno

 view release on metacpan or  search on metacpan

lib/Convert/Pheno/CSV.pm  view on Meta::CPAN

        data_mapping_file    => $data_mapping_file,
        participant          => $participant,
        record               => $record,
        self                 => $self,
        individual           => $individual,
        term_mapping_cursor  => undef,
        participant_id_field => undef,
        participant_id       => undef
    };

    $param_sub->{lock_keys} = [ 'lock_keys', keys %$param_sub ];

 view all matches for this distribution


( run in 3.104 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )