Result:
found 368 distributions and 1276 files matching your query ! ( run in 1.595 )


Tk-HListbox

 view release on metacpan or  search on metacpan

lib/Tk/HListbox.pm  view on Meta::CPAN

B<browse> mode where it has no effect.

=item [19]

The F16 key (labelled Copy on many Sun workstations) or Meta-w 
copies the selection in the widget to the clipboard, if there is 
a selection.

=item [20]

We've added <Ctrl-<Prior>> and <Ctrl-<Next>> bindings 

 view all matches for this distribution


Tk-JListbox

 view release on metacpan or  search on metacpan

JListbox.pm  view on Meta::CPAN

   
   $dw->bind('<Button-3>', sub{ $dw->JraisePopup });
   $dw->bind('<Button-1>', sub{ $dw->lowerPopup });
}

# Copy the selected elements to the clipboard;
sub Jcopy{
   my $dw = shift;
   my $popup = $dw->cget(-popupmenu);
   my @selection = $dw->curselection;
   
   if(@selection ne ""){
      $dw->clipboardClear;
      
      foreach my $index(@selection){ 
         my $string = $dw->get($index);
         
         # Remove any leading or trailing whitespace
         $string =~ s/^\s*//;
         $string =~ s/\s*$//;
         $dw->clipboardAppend('--', $string); 
      }
   }
   
   $popup->withdraw;
   $dw->grabRelease;   
}

# Cut the selection and copy it to the clipboard
sub Jcut{
   my $dw = shift;
   my $popup = $dw->cget(-popupmenu);
   
   my @selection = $dw->curselection;
   
   if(@selection ne ""){
      $dw->clipboardClear;
      
      foreach my $index(@selection){ 
         my $string = $dw->get($index);
         
         # Remove any leading or trailing whitespace
         $string =~ s/^\s*//;
         $string =~ s/\s*$//;
         $dw->clipboardAppend('--', $string);
         
         # Remove the item
         $dw->delete($index); 
      }
   }

JListbox.pm  view on Meta::CPAN


# Determine the various menu items should be 'normal' or 'disabled'
sub JsetState{
   my $dw = shift;

   my($selection, $clipboard);
   
   eval { $selection = $dw->curselection };
   Tk::catch{ $clipboard = $dw->SelectionGet(-selection=>'CLIPBOARD') };

   my $menuref = $dw->cget(-menuitems);

   # Set the default menu items to 'disabled', enabling them if appropriate
   foreach my $item (@$menuref){

JListbox.pm  view on Meta::CPAN

         $dw->{"m_$item->[0]"}->configure(-state=>'disabled');
      }
   }
   
   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   # Only set state to 'normal' for default items if clipboard is
   # not empty or selection is present.
   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   if( (defined($selection)) && ($clipboard) && ($dw->{m_Paste})){
      $dw->{m_Paste}->configure(-state=>'normal');
   }
   if( (defined($selection)) && ($dw->{m_Cut})){
      $dw->{m_Cut}->configure(-state=>'normal');
   }

JListbox.pm  view on Meta::CPAN


If the -popupmenu option is used, a "Cut, Copy, Paste" menu will appear when
the user right-clicks anywhere on the JListbox.

The "Cut" option will remove the item from the JListbox, copy it to the
clipboard and the remaining items will shift up automatically.

The "Copy" option simply copies the selected value to the clipboard.

The "Paste" option, if selected, will bring up a Dialog window that gives the
user the option to paste (insert) above or below the selected item, as well as
on the same line, either to the left or right of the selected item.  

 view all matches for this distribution


Tk-LabPopEntry

 view release on metacpan or  search on metacpan

LabPopEntry.pm  view on Meta::CPAN

# below.  Note that any non-default menu-items should automatically have 
# their state set to 'normal'.
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sub setState{
   my $dw = shift; 
   my($entry, $entryVal, $selection, $clipboard);

   # For bind operations, the Entry widget is actually the first arg passed
   if(ref($dw) eq "Tk::Entry"){ 
      $entry = $dw;
      $dw = $entry->parent;

LabPopEntry.pm  view on Meta::CPAN


   my $menuitems = $dw->cget(-menuitems);

   $entryVal  = $entry->get;
   $selection = getSelection($dw, 'PRIMARY');
   $clipboard = getSelection($dw, 'CLIPBOARD');

   foreach my $item(@$menuitems){
      if($item->[0] =~ /Cut|Copy|Paste|Delete|Sel. All/){
         eval{$dw->{"mb_$item->[0]"}->configure(-state=>'disabled')};
      }
   }

   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   # Only set state to 'normal' for default items if clipboard is
   # not empty or selection is present.
   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   if(($clipboard) && ($dw->{mb_Paste})){
      eval{$dw->{mb_Paste}->configure(-state=>'normal')};
   }
   if(($selection) && ($dw->{mb_Cut})){
      eval{$dw->{mb_Cut}->configure(-state=>'normal')};
   }

LabPopEntry.pm  view on Meta::CPAN


   return;


   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   # Only set state to 'normal' for default items if clipboard is
   # not empty or selection is present.
   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   if(defined $dw->{"mb_Paste"}){
      if(($clipboard) && ($dw->{"mb_Paste"}->cget(-state) ne 'normal')){
         eval{ $dw->{mb_Paste}->configure(-state=>'normal') };
      }
   }
   if(defined $dw->{"mb_Cut"}){
      if(($selection) && ($dw->{"mb_Cut"}->cget(-state) ne 'normal')){

LabPopEntry.pm  view on Meta::CPAN

   
   $entry->selectionRange(0,'end');
   setState($dw);
}

# Copy data to the clipboard
sub copyToClip{
   my $dw = shift;
   my $entry;

   # For bind operations, the Entry widget is actually the first arg passed

LabPopEntry.pm  view on Meta::CPAN

   }
   else{ $entry = $dw->cget(-entry) }

   if($entry->selectionPresent){
      my $string = $entry->SelectionGet(-selection=>'PRIMARY');
      $dw->clipboardClear;
      $dw->clipboardAppend('--',$string);
   }

   my $popupmenu = $dw->Subwidget('popupmenu');
   $dw->withdrawMenu if($popupmenu->ismapped);
}

# Automatically put cut data into the clipboard
sub cutToClip{
   my $dw = shift;
   my $entry;

   # For bind operations, the Entry widget is actually the first arg passed

LabPopEntry.pm  view on Meta::CPAN

   }
   else{ $entry = $dw->cget(-entry) }

   if($entry->selectionPresent){
      my $string = deleteSelected($entry);
      $entry->clipboardClear;
      $entry->clipboardAppend('--', $string);
   }

   my $popupmenu = $dw->Subwidget('popupmenu');
   $dw->withdrawMenu if($popupmenu->ismapped);
}

LabPopEntry.pm  view on Meta::CPAN

      $to = $entry->index('sel.last');
      $deleted_string = substr($entry->get, $from, $to-$from);
      $entry->delete($from,$to);
   }

   #$dw->clipboardClear;

   my $popupmenu = $dw->Subwidget('popupmenu');
   $dw->withdrawMenu if($popupmenu->ismapped);
   
   return $deleted_string;
}

# Paste data from the clipboard into the Entry widget
sub pasteFromClip{
   my $dw = shift;

   my($entry, $from);

LabPopEntry.pm  view on Meta::CPAN

By default, there are five items attached to the right-click menu: Cut, Copy,
Paste, Delete and Sel. All.  The default bindings for the items are Control-x,
Control-c, Control-v, Control-d, and Control-a, respectively.

The difference between 'Cut' and 'Delete' is that the former automatically
copies the contents that were cut to the clipboard, while the latter does not.

=head2 OPTIONS

B<-pattern =E<gt>> I<string>

 view all matches for this distribution


Tk-MK

 view release on metacpan or  search on metacpan

lib/Tk/Treeplus.pm  view on Meta::CPAN

		#
        -wrapsearch 	 		=> ['PASSIVE', 'wrapsearch', 'Wrapsearch', 0 ],
        #
		-maxselhistory 	 		=> ['PASSIVE', 'maxselhistory', 'Maxselhistory', MAX_HISTORY_SIZE ],
		#
        -clipboardseparator		=> ['PASSIVE', 'clipboardseparator', 'Clipboardseparator', DEFAULT_CLIPBOARD_SEPARATOR ],
		#
		-headerminwidth 		=> ['PASSIVE', 'minwidth', 'MinWidth', 20 ],
		-headerclosedwidth		=> ['PASSIVE', 'closedwidth', 'ClosedMinWidth', 5 ],
        #
		-headerforeground 		=> ['PASSIVE', 'headerForeground', 'HeaderForeground', 'black'],

lib/Tk/Treeplus.pm  view on Meta::CPAN

			-label => 'X-ClipBoard',
			-tearoff => '0',
	);
	$xclip_submenu->command(
					-label => 'Export Selected Entry(ies)',
					-command => sub { $this->__copy_selection_to_clipboard() },
					-accelerator => 'Ctrl-c'
	);
	$xclip_submenu->command(
					-label => 'Export Selection + Column Headers',
					-command => sub { $this->__copy_selection_to_clipboard('use_header_info') },
					-accelerator => 'Ctrl-C'
	);

	# Set some default bindings
	$this->bind('<Control-c>' => sub { $this->__copy_selection_to_clipboard() } );
	$this->bind('<Control-C>' => sub { $this->__copy_selection_to_clipboard('use_header_info') } );
 	$this->bind('<Control-f>' => sub { $this->__find_hlentry(0) } );


	#------------------------------------------------------------------------
 	$menu->Popup(-popover => 'cursor', -popanchor => 'nw');

lib/Tk/Treeplus.pm  view on Meta::CPAN

#-----------------------------------------------------------------
# Very internal related function, NOT to be invoked by user apps 
#-----------------------------------------------------------------
# Transfers the current selected entries of the given
# widget into the common X11-Clipboard.
sub __copy_selection_to_clipboard
{
    #print "DBG: reached function [__copy_selection_to_clipboard] with >@_<, called by >", caller, "<\n";
	# Parameter
	my ($this, $use_header_info) = @_;

	# Locals
	my (@selitems, $selectforeground, $selectbackground, $text, $clip_txt,
		$wclass, $col_cnt, $clipboard_column_separator, $column, $entry);

	return unless $this;
	@selitems = $this->infoSelection();
	if (@selitems) {
		$selectforeground = $this->cget('-selectforeground');
		$selectbackground = $this->cget('-selectbackground');
		
		$wclass = ref $this; $clip_txt = '';
		$col_cnt = $this->cget('-columns');
		$clipboard_column_separator = $this->cget('-clipboardseparator');
		if ($wclass =~ /HList|Tree/io and $use_header_info and $this->cget('-header')) {
			for ($column = 0; $column < $col_cnt; $column++) {
				$clip_txt .= $clipboard_column_separator if $clip_txt;
				$clip_txt .= $this->headerCget($column, '-text');
			}
			#print "DBG: header: [\$clip_txt] = >$clip_txt<\n";
		}
		# REtrieve all selected items

lib/Tk/Treeplus.pm  view on Meta::CPAN

				$text = $this->entrycget($_, '-text');
			}
			elsif ($wclass =~ /HList|Tree/io) {
				$text = '';
				for ($column = 0; $column < $col_cnt; $column++) {
					$text .= $clipboard_column_separator if length $text;
					$entry  = $this->itemCget($_, $column, '-text'); $entry  = '' unless defined $entry;
					$text .= $entry;
				}
			}
			else {

lib/Tk/Treeplus.pm  view on Meta::CPAN

			$clip_txt .= "\n" if $clip_txt;
			$clip_txt .= $text;
		}
		if ($clip_txt) {
			# Update the global (unix) Clipboard
			$this->clipboardClear();
			$this->clipboardAppend($clip_txt);		    
			$this->configure( -selectforeground => 'black',
								-selectbackground => ($use_header_info ? 'lawngreen' : 'darkgreen'),
			);
			#print "DBG: Copied Entries [$clip_txt] from Widget [$wclass] to global X-clipboard.\n"
		}
		else {
			$this->clipboardClear();
			$this->clipboardAppend($clip_txt);		    
			$this->configure( -selectforeground => 'white',
								-selectbackground => 'darkred',
			);
			carp "Internal Warning: Failed to copy Entries from Widget [$wclass] to global X-clipboard!\n"
		}
		$this->update;
 		usleep(900000);
		$this->configure( -selectforeground => $this->cget('-foreground'),
							-selectbackground => $this->cget('-background'),

lib/Tk/Treeplus.pm  view on Meta::CPAN


=item B<-maxselhistory> nnn

Specifies the maximum number of I<chached> list-selection operations, which can be recalled via the pop-up-menu.

=item B<-clipboardseparator> CHAR

Specifies the B<colum separator character> which is used if the the current selection is export to the X11 Clipboard.
This operation can be done via CTRl-C or via the pop-up-menu. (default char: '|')

=item B<-headerminwidth> nnn

 view all matches for this distribution


Tk-Markdown

 view release on metacpan or  search on metacpan

lib/Tk/Markdown.pm  view on Meta::CPAN

    my $val = $class->bindRdOnly($mw);
    my $cb = $mw->bind($class,'<Next>');
    $mw->bind($class,'<space>',$cb) if (defined $cb);
    $cb = $mw->bind($class,'<Prior>');
    $mw->bind($class,'<BackSpace>', $cb) if (defined $cb);
    $class->clipboardOperations($mw,'Copy');
    return $val;
}


=head2 Populate

 view all matches for this distribution


Tk-MarkdownTk

 view release on metacpan or  search on metacpan

lib/Tk/MarkdownTk.pm  view on Meta::CPAN

  my $val = $class->bindRdOnly($mw);
  my $cb = $mw->bind($class,'<Next>');
  $mw->bind($class,'<space>',$cb) if (defined $cb);
  $cb = $mw->bind($class,'<Prior>');
  $mw->bind($class,'<BackSpace>', $cb) if (defined $cb);
  $class->clipboardOperations($mw,'Copy');
  return $val;
}

=head2 Populate

 view all matches for this distribution


Tk-OS2src

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

+# OS/2 PM uses different event loops in presense and absense of windows
+# Allow window creation code to substitute 
+set_pEvenProc(Tk::Event::get_pEvenProc()) if $^O eq 'os2';
+
 use Tk::Submethods ('option'    =>  [qw(add get clear readfile)],
                     'clipboard' =>  [qw(clear append)]
                    );
--- ./pTk/mTk/unix/tkUnixPort.h~	Thu Mar 25 16:51:56 1999
+++ ./pTk/mTk/unix/tkUnixPort.h	Fri Apr 16 01:28:50 1999
@@ -93,7 +93,9 @@
 #include <X11/cursorfont.h>

 view all matches for this distribution


Tk-PopEntry

 view release on metacpan or  search on metacpan

PopEntry.pm  view on Meta::CPAN

# below.  Note that any non-default menu-items should automatically have 
# their state set to 'normal'.
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sub setState{
   my $dw = shift; 
   my($dwVal, $selection, $clipboard);

   my $menuitems = $dw->cget(-menuitems);

   $dwVal  = $dw->get;
   $selection = getSelection($dw, 'PRIMARY');
   $clipboard = getSelection($dw, 'CLIPBOARD');

   foreach my $item(@$menuitems){
      if($item->[0] =~ /Cut|Copy|Paste|Delete|Sel. All/){
         eval{$dw->{"mb_$item->[0]"}->configure(-state=>'disabled')};
      }
   }

   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   # Only set state to 'normal' for default items if clipboard is
   # not empty or selection is present.
   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   if(($clipboard) && ($dw->{mb_Paste})){
      eval{$dw->{mb_Paste}->configure(-state=>'normal')};
   }
   if(($selection) && ($dw->{mb_Cut})){
      eval{$dw->{mb_Cut}->configure(-state=>'normal')};
   }

PopEntry.pm  view on Meta::CPAN


   return;


   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   # Only set state to 'normal' for default items if clipboard is
   # not empty or selection is present.
   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   if(defined $dw->{"mb_Paste"}){
      if(($clipboard) && ($dw->{"mb_Paste"}->cget(-state) ne 'normal')){
         eval{ $dw->{mb_Paste}->configure(-state=>'normal') };
      }
   }
   if(defined $dw->{"mb_Cut"}){
      if(($selection) && ($dw->{"mb_Cut"}->cget(-state) ne 'normal')){

PopEntry.pm  view on Meta::CPAN


   $dw->selectionRange(0,'end');
   setState($dw);
}

# Copy data to the clipboard
sub copyToClip{
   my $dw = shift;

   if($dw->selectionPresent){
      my $string = $dw->SelectionGet(-selection=>'PRIMARY');
      $dw->clipboardClear;
      $dw->clipboardAppend('--',$string);
   }

   my $popupmenu = $dw->Subwidget('popupmenu');
   $dw->withdrawMenu if($popupmenu->ismapped);
}

# Automatically put cut data into the clipboard
sub cutToClip{
   my $dw = shift;

   if($dw->selectionPresent){
      my $string = deleteSelected($dw);
      $dw->clipboardClear;
      $dw->clipboardAppend('--', $string);
   }

   my $popupmenu = $dw->Subwidget('popupmenu');
   $dw->withdrawMenu if($popupmenu->ismapped);
}

PopEntry.pm  view on Meta::CPAN

   $dw->withdrawMenu if($popupmenu->ismapped);
   
   return $deleted_string;
}

# Paste data from the clipboard into the Entry widget
sub pasteFromClip{
   my $dw = shift;

   my($from);

PopEntry.pm  view on Meta::CPAN

By default, there are five items attached to the right-click menu: Cut, Copy,
Paste, Delete and Sel. All.  The default bindings for the items are Control-x,
Control-c, Control-v, Control-d, and Control-a, respectively.

The difference between 'Cut' and 'Delete' is that the former automatically
copies the contents that were cut to the clipboard, while the latter does not.

=head2 OPTIONS

B<-pattern =E<gt>> I<string>

 view all matches for this distribution


Tk-TM

 view release on metacpan or  search on metacpan

lib/Tk/TM/Lang.pm  view on Meta::CPAN

  ,"-------- 'Edit' - Editing data --------"
  ,"'New record', [+], [Ctrl+N] - create (append) new record of data."
  ,"'Delete record', [-], [Ctrl+Y] - delete the current record of data."
  ,"'Undo edit' - undo changes made in current record."
  ,"'Prompt...', [F4] - entry help screen to choose value to enter into field."
  ,"'Cut' - cut selected text from field onto clipboard."
  ,"'Copy' - copy selected text from field onto clipboard."
  ,"'Paste' - paste text from clipboard to cursor position."
  ,"'Delete' - delete selected text."
  ,"-------- 'Actions', [..] - Actions of application --------"
  ,"Contains available application actions."
  ,"-------- 'Search' - Search, Query, Navigation --------"
  ,"'Query', [Q] - read data onto screen (query database)."

 view all matches for this distribution


Tk-TableMatrix

 view release on metacpan or  search on metacpan

TableMatrix.pm  view on Meta::CPAN

		


# ClipboardKeysyms --
# This procedure is invoked to identify the keys that correspond to
# the "copy", "cut", and "paste" functions for the clipboard.
#
# Arguments:
# copy -	Name of the key (keysym name plus modifiers, if any,
#		such as "Meta-y") used for the copy operation.
# cut -		Name of the key used for the cut operation.

TableMatrix.pm  view on Meta::CPAN

   $w->colWidth($tmp,$width += -$a);
  }
}
# Copy --
# This procedure copies the selection from a table widget into the
# clipboard.
#
# Arguments:
# w -		Name of a table widget.

sub Copy
{
 my $w = shift;
 if ($w->SelectionOwner() eq $w)
  {
   $w->clipboardClear;
   eval
    {
     $w->clipboardAppend($w->GetSelection);
    }
   ;
  }
}
# Cut --
# This procedure copies the selection from a table widget into the
# clipboard, then deletes the selection (if it exists in the given
# widget).
#
# Arguments:
# w -		Name of a table widget.

sub Cut
{
 my $w = shift;
 if ($w->SelectionOwner() eq $w)
  {
   $w->clipboardClear;
   eval
    {
     $w->clipboardAppend($w->GetSelection);
     $w->curselection('');# Clear whatever is selected
     $w->selectionClear();
    }
   ;
  }
}
# Paste --
# This procedure pastes the contents of the clipboard to the specified
# cell (active by default) in a table widget.
#
# Arguments:
# w -		Name of a table widget.
# cell -	Cell to start pasting in.

 view all matches for this distribution


Tk-Terminal

 view release on metacpan or  search on metacpan

lib/Tk/Terminal.pm  view on Meta::CPAN

	$self->delete('1.0', 'end - 2c');
	$self->linkScanned(1);
	$self->prompt;
}

sub clipboardCut { #Disabling clipboard cut
}

sub clipboardPaste { #clipboard paste now pastes as if typed
	my $self = shift;
	my $text = $self->clipboardGet;
	while ($text =~ s/(.)//) {
		$self->Insert($1); 
	}
}

 view all matches for this distribution


Tk-Text-SuperText

 view release on metacpan or  search on metacpan

lib/Tk/Text/SuperText.pm  view on Meta::CPAN

	};
	return $res;
}
#+

# clipboard methods that must be overriden for rectangular selections

sub deleteSelected
{
	my $w = shift;
	

lib/Tk/Text/SuperText.pm  view on Meta::CPAN


sub copy
{
	my $w = shift;

	Tk::catch{$w->clipboardCopy;};
}

sub cut
{
	my $w = shift;

	Tk::catch{$w->clipboardCut;};
	$w->see('insert');
}

sub paste
{
	my $w = shift;

	Tk::catch{$w->clipboardPaste;};
	$w->see('insert');
}

sub inlinePaste
{
	my $w = shift;
	my ($l,$c) = split('\.',$w->index('insert'));
	my $str;
	my $f=0;
	Tk::catch{$str=$w->clipboardGet;};
	
	if($str eq "") {return;}
	$w->_BeginUndoBlock;
	while($str =~ /(.*)\n+/g) {
		$w->insert("$l.$c",$1);

 view all matches for this distribution


Tk-Text-Viewer

 view release on metacpan or  search on metacpan

Viewer.pm  view on Meta::CPAN

 my $cb  = $mw->bind($class,'<Next>');
 $class->bindRdOnly($mw);
 $mw->bind($class,'<space>',$cb) if (defined $cb);
 $cb  = $mw->bind($class,'<Prior>');
 $mw->bind($class,'<BackSpace>',$cb) if (defined $cb);
 $class->clipboardOperations($mw,'Copy');
 $mw->bind($class,'<Key-slash>',FindSimplePopUp);
 $mw->bind($class,'<Key-n>', FindSelectionNext);
 $mw->bind($class,'<Key-N>', FindSelectionPrevious);
 $mw->bind($class,'<Control-a>', FindAll );
 return $class;

 view all matches for this distribution


Tk-TextHighlight

 view release on metacpan or  search on metacpan

lib/Tk/TextHighlight.pm  view on Meta::CPAN

	$w->bind($class,	'<Tab>', 'insertTab' );           #ADDED TO ALLOW INSERTION OF TABS OR SPACES!
	$w->bind($class,	'<ButtonRelease-2>', '');         #CHECK READONLY STATUS BEFORE PASTING SELECTION!
	return $class;
}

sub clipboardCopy {
	my $cw = shift;
	my @ranges = $cw->tagRanges('sel');
	if (@ranges) {
		$cw->SUPER::clipboardCopy(@_);
	}
}

sub beginUndoBlock
{

lib/Tk/TextHighlight.pm  view on Meta::CPAN

	#WARNING, DOESN'T SEEM TO EXECUTE ANYTHING AFTER THE ResetUndo?!:
}

#FUNCTIONS NOT USED IN THE READ-ONLY VERSION:

sub clipboardCut {
	my $cw = shift;
	return  if ($cw->{READONLY});

	my @ranges = $cw->tagRanges('sel');
	$cw->SUPER::clipboardCut(@_)  if (@ranges);
}

sub clipboardPaste {
	my $cw = shift;
	return  if ($cw->{READONLY});

	my @ranges = $cw->tagRanges('sel');
	if (@ranges) {
		$cw->tagRemove('sel', '1.0', 'end');
		return;
	}
	$cw->SUPER::clipboardPaste(@_);
}

sub delete {
	my $cw = shift;
	return  if ($cw->{READONLY});

lib/Tk/TextHighlight.pm  view on Meta::CPAN

Used in application programs when wishing to group together a series of edits 
that, in the event of a call to B<Undo()> should be undone together as a 
group.  This method should be called before the first insertion or deletion.  
See also B<endUndoBlock>.

=item B<clipboardCopy>

Copies any selected text to the system's CLIPBOARD paste-buffer.

Default bindings:  B<Control-c>.

=item B<clipboardCut>

Default bindings:  B<Control-x>.

Deletes the selected text from the widget and puts it in the system's 
CLIPBOARD paste-buffer.

=item B<clipboardPaste>

Pastes the content of the system's CLIPBOARD paste-buffer at the current 
cursor position and selects it.

Default bindings:  B<Control-v>.

 view all matches for this distribution


Tk-TextVi

 view release on metacpan or  search on metacpan

lib/Tk/TextVi.pm  view on Meta::CPAN

    return if $register =~ /[_:.%#0-9]/;

    # Always store in the unnamed register
    $w->{VI_REGISTER}{''} = $text;

    # * is the clipboard
    if( $register eq '*' ) {
        $w->clipboardClear;
        $w->clipboardAppend( '--', $text );
    }
    else {
        if( $register =~ tr/A-Z/a-z/ ) {
            $w->{VI_REGISTER}{$register} .= $text;
        }

lib/Tk/TextVi.pm  view on Meta::CPAN


Same as setMessage, but the message is added to the error list and the error message event is generated.

=item $text->registerStore( $register, $text )

Store the contents of $text into the specified register.  The text will also be stored in the unnamed register.  If the '*' register is specified, the clipboard will be used.  If the black-hole or a read-only register is specified nothing will happen...

=item $text->registerGet( $register )

Returns the text stored in a register

 view all matches for this distribution


Tk-Workspace

 view release on metacpan or  search on metacpan

Workspace.pm  view on Meta::CPAN


my $defaultbackgroundcolor="white";
my $defaultforegroundcolor="black";
my $defaulttextfont="*-courier-medium-r-*-*-12-*";
my $menufont="*-helvetica-medium-r-*-*-12-*";
my $clipboard;          # Internal clipboard.

sub new {
    my $proto = shift;
    my $class = ref( $proto ) || $proto;
    my @construct_args = @_;

Workspace.pm  view on Meta::CPAN

    my $t = $self -> text;
    $t -> Subwidget('yscrollbar') -> configure(-width=>10);
    $t -> Subwidget('xscrollbar') -> configure(-width=>10);
    $t -> setFixedTabs ( 5 );
    $self -> window -> protocol( WM_TAKE_FOCUS, sub{ $self -> wmgeometry});
    # Prevents errors when trying to paste from an empty clipboard.
    $t -> clipboardAppend( '' );
    $self -> focusFollowsMouse;
    $self -> {encoding} = 'iso88591';
    $t -> focus;
    $t -> markGravity( 'insert', 'right' );
    return $self;

Workspace.pm  view on Meta::CPAN


sub ws_copy {
    my $self = shift;
    my $selection;
    if ( ! (($self -> {text}) -> tagRanges('sel')) ) { return; }
    # per clipboard.txt, this asserts workspace text widget's
    # ownership of X display clipboard, and clears it.
    ($self -> {text}) -> clipboardClear;
    $selection = ($self -> {text})
	-> SelectionGet(-selection => 'PRIMARY',
			-type => 'STRING' );
    # Appends PRIMARY selection to X display clipboard.
    ($self -> {text}) -> clipboardAppend($selection);
    $clipboard = $selection;   # our  clipboard, not X's.
    return $selection;
}

sub ws_cut {
    my $self = shift;
    my $selection;
    if ( ! (($self -> {text}) -> tagRanges('sel')) ) { return; }
    # per clipboard.txt, this asserts workspace text widget's
    # ownership of X display clipboard, and clears it.
    ($self -> {text}) -> clipboardClear;
    $selection = ($self -> {text})
	-> SelectionGet(-selection => 'PRIMARY',
			-type => 'STRING' );
    # Appends PRIMARY selection to X display clipboard.
    ($self -> {text}) -> clipboardAppend($selection);
    ($self ->{text}) ->
	delete(($self -> {text}) -> tagRanges('sel'));
    $clipboard = $selection;   # our  clipboard, not X's.
    $self -> {text} -> {SubWidget}{workspacetext}{modified} = '1';
    return $selection;
}

sub ws_paste {
    my $self = shift;
    my $selection;
    my $point;
    # Don't use CLIPBOARD because of a bug? in PerlTk...
    #
    # Checks PRIMARY selection, then X display clipboard,
    # and returns if neither is defined.
#    ($self -> {text}) ->
#	selectionOwn(-selection => 'CLIPBOARD');
#    if ( ! (($self -> {text}) -> tagRanges('sel'))
#	 or (($selection =  ($self -> {text})

Workspace.pm  view on Meta::CPAN

#    if ($self -> {text} -> tagRanges('sel')) {
#	$selection = ($self -> {text})
#	    -> SelectionGet(-selection => 'PRIMARY',
#			    -type => 'STRING');
#    } else {
#	$selection = $clipboard;
#    }
    $selection = ($self -> {text}) -> clipboardGet;
    $point = ($self -> {text}) -> index("insert");
    ($self -> {text}) -> insert( $point,
				      $selection);
    ($self -> {text}) -> see( 'insert' );
    $self -> {text} -> {SubWidget}{workspacetext}{modified} = '1';

Workspace.pm  view on Meta::CPAN


=head2 Edit Menu

Undo -- Reverse the next previous change to the text.

Cut -- Delete the selected text and place it on the X clipboard.

Copy -- Copy the selected text to the X clipboard.

Paste -- Insert text from the X clipboard at the insertion point.

Evaluate Selection -- Interpret the selected text as Perl code.

Search & Replace -- Open a dialog box to enter search and/or replace
strings.  Users can select options for exact upper/lower case

 view all matches for this distribution


UI-KeyboardLayout

 view release on metacpan or  search on metacpan

TSF-framework  view on Meta::CPAN


The messages from text services arrive through the interface methods provided by ITfContextOwnerCompositionSink and ITextStoreACP.

Storage:

What kind of changes can happen to the document that do not come from text services is not known (clipboard, formatting etc. possibly)

The section of the document which is being edited is stored as a DocMgr. This interface looks pretty simple. It is not clear how much of the document is stored at one time (assumedly the amount which is seen on the screen, which would be dictated by ...

Porting:

 view all matches for this distribution


UnixODBC

 view release on metacpan or  search on metacpan

tkdm/tkdm  view on Meta::CPAN

=head2 Displaying Results

Data that consists of more than one line of text is displayed in a
scrollable window.  The text window is resizable by dragging the lower
right corner of the window.  You can cut and paste highlighted text
into other applications with the X Window clipboard, or with the text
menu options described in, "Text Menu Options."

=head1 MENU COMMANDS

Clicking the right mouse button opens the program's main menu, or a

 view all matches for this distribution


Video-Dumper-QuickTime

 view release on metacpan or  search on metacpan

samples/DumpQuickTime.pl  view on Meta::CPAN

    $tree->Busy( -recurse => 1 );
    if ( $tree->info( children => $path ) ) {
        openTree( $tree, $path, 1 );
    }
    else {
        $tree->clipboardClear ();
        $tree->clipboardAppend ($text);
    }

    $tree->Unbusy();
}

 view all matches for this distribution


Vimana

 view release on metacpan or  search on metacpan

t/data/gist.vim  view on Meta::CPAN

"
"   :Gist XXXXX
"     edit gist XXXXX.
"
"   :Gist -c XXXXX.
"     get gist XXXXX and put to clipboard.
"  
"   :Gist -l
"     list gists from mine.
"
"   :Gist -l mattn

t/data/gist.vim  view on Meta::CPAN

"
"     # mac
"     let g:gist_clip_command = 'pbcopy'
"
"     # linux
"     let g:gist_clip_command = 'xclip -selection clipboard'
"
"     # others(cygwin?)
"     let g:gist_clip_command = 'putclip'
"
"   * if you want to detect filetype from gist's filename...

t/data/gist.vim  view on Meta::CPAN

  else
    exe "w".(v:cmdbang ? "!" : "")." ".fnameescape(v:cmdarg)." ".fnameescape(a:fname)
  endif
endfunction

function! s:GistGet(user, token, gistid, clipboard)
  let url = 'http://gist.github.com/'.a:gistid.'.txt'
  let winnum = bufwinnr(bufnr('gist:'.a:gistid))
  if winnum != -1
    if winnum != bufwinnr('%')
      exe "normal \<c-w>".winnum."w"

t/data/gist.vim  view on Meta::CPAN

  doau StdinReadPost <buffer>
  normal! gg
  if (&ft == '' && g:gist_detect_filetype == 1) || g:gist_detect_filetype == 2
    call s:GistDetectFiletype(a:gistid)
  endif
  if a:clipboard
    if exists('g:gist_clip_command')
      exec 'silent w !'.g:gist_clip_command
    else
      normal! ggVG"+y
    endif

t/data/gist.vim  view on Meta::CPAN

  let gistid = ''
  let gistls = ''
  let gistnm = ''
  let private = 0
  let multibuffer = 0
  let clipboard = 0
  let deletepost = 0
  let editpost = 0
  let listmx = '^\(-l\|--list\)\s*\([^\s]\+\)\?$'
  let bufnamemx = '^gist:\([0-9a-f]\+\)$'

t/data/gist.vim  view on Meta::CPAN

    elseif arg =~ '^\(-p\|--private\)$'
      let private = 1
    elseif arg =~ '^\(-a\|--anonymous\)$'
      let user = ''
      let token = ''
    elseif arg =~ '^\(-c\|--clipboard\)$'
      let clipboard = 1
    elseif arg =~ '^\(-d\|--delete\)$' && bufname =~ bufnamemx
      let deletepost = 1
      let gistid = substitute(bufname, bufnamemx, '\1', '')
    elseif arg =~ '^\(-e\|--edit\)$' && bufname =~ bufnamemx
      let editpost = 1

t/data/gist.vim  view on Meta::CPAN

  unlet args
  "echo "gistid=".gistid
  "echo "gistls=".gistls
  "echo "gistnm=".gistnm
  "echo "private=".private
  "echo "clipboard=".clipboard
  "echo "editpost=".editpost
  "echo "deletepost=".deletepost

  if len(gistls) > 0
    call s:GistList(user, token, gistls)
  elseif len(gistid) > 0 && editpost == 0 && deletepost == 0
    call s:GistGet(user, token, gistid, clipboard)
  else
    if multibuffer == 1
      let url = s:GistPostBuffers(user, token, private)
    else
      let content = join(getline(a:line1, a:line2), "\n")

 view all matches for this distribution


WWW-Mechanize-Chrome

 view release on metacpan or  search on metacpan

lib/WWW/Mechanize/Chrome.pm  view on Meta::CPAN


# We don't yet inherit from Moo 2, so patch up things manually
use parent 'MooX::Role::EventEmitter';

# add Browser.setPermission , .grantPermission for
# restricting/allowing recording, clipboard, idleDetection, ...

=encoding utf-8

=head1 NAME

 view all matches for this distribution


WWW-ORCID

 view release on metacpan or  search on metacpan

examples/sandbox/public/jsoneditor.min.js  view on Meta::CPAN

u&&(n+=" var schema"+r+" = "+f+"; ",f="schema"+r);var p="i"+r;u||(n+=" var schema"+r+" = validate.schema"+a+";"),n+="var "+d+";",u&&(n+=" if (schema"+r+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+r+")) "+d+" = false; else {"),n+=""...
n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=A}else...
undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){var t=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(e.node,t),t=i})}},removeNodes:{undo:function(e){var t=e.parent,i=t.childs[e.index]||t.append;e...
if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e...
className:"jsoneditor-insert",click:function(){i._onInsertBefore("","","auto")},submenu:[{text:"Auto",className:"jsoneditor-type-auto",title:r.auto,click:function(){i._onInsertBefore("","","auto")}},{text:"Array",className:"jsoneditor-type-array",tit...
!n&&13===i){var r="location"in t?t.location:t.keyLocation;if(3===r&&(e(t,n,-i),t.defaultPrevented))return}if(s.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return n||i in o.FUNCTION_KEYS||i in o.PRINTABLE_KEYS?e(t,n,i):!1}function r()...
setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this...
}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e...
return s[e].apply(s,t)}}var a=i.apply(this,t);return i?a:void 0},this.transformAction=function(e,t,i,n,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.g...
t.cursor=t.end}else{var a=this.$findOpeningBracket(s[2],e);if(!a)return null;t=o.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket...
}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];...

 view all matches for this distribution


WWW-Spinn3r

 view release on metacpan or  search on metacpan

t/02.xml  view on Meta::CPAN

&lt;/script&gt;

&lt;!-- SyntaxHighlighter Stuff --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://s.wordpress.com/wp-content/plugins/highlight/shCore.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	dp.SyntaxHighlighter.ClipboardSwf = &#039;http://s.wordpress.com/wp-content/plugins/highlight/clipboard.swf&#039;;
	dp.SyntaxHighlighter.HighlightAll(&#039;code&#039;);
&lt;/script&gt;


&lt;/body&gt;

t/02.xml  view on Meta::CPAN

&lt;/script&gt;

&lt;!-- SyntaxHighlighter Stuff --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://s.wordpress.com/wp-content/plugins/highlight/shCore.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	dp.SyntaxHighlighter.ClipboardSwf = &#039;http://s.wordpress.com/wp-content/plugins/highlight/clipboard.swf&#039;;
	dp.SyntaxHighlighter.HighlightAll(&#039;code&#039;);
&lt;/script&gt;


&lt;/body&gt;

 view all matches for this distribution


WWW-Wappalyzer

 view release on metacpan or  search on metacpan

lib/WWW/wappalyzer_src/technologies/c.json  view on Meta::CPAN

  "Clipboard.js": {
    "cats": [
      59
    ],
    "icon": "Clipboard.js.svg",
    "scriptSrc": "clipboard(?:-([\\d.]+))?(?:\\.min)?\\.js\\;version:\\1",
    "website": "https://clipboardjs.com/"
  },
  "CloudCart": {
    "cats": [
      6
    ],

 view all matches for this distribution


Wcpancover

 view release on metacpan or  search on metacpan

share/files/public/skins/default/jquery-ui-1.9.1.custom/css/redmond/jquery-ui-1.9.1.custom.css  view on Meta::CPAN

.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }

 view all matches for this distribution


Weather-GHCN-Fetch

 view release on metacpan or  search on metacpan

lib/Weather/GHCN/App/CacheUtil.pm  view on Meta::CPAN

            exit 1;
        }
        return;
    }

    # send print output to the Windows clipboard if requested and doable
    outclip() if $Opt->outclip and $USE_WINCLIP;

    my $alias_href = get_alias_stnids($ghcn->profile_href);

    my $files_href = load_cached_files($ghcn, $cache_pto, $alias_href);

lib/Weather/GHCN/App/CacheUtil.pm  view on Meta::CPAN

        'size|kb:i',            # select files by size in Kb
        'age:i',                # select file if >= age
        'type:s',               # select based on type
        'cachedir:s',           # cache location
        'profile:s',            # profile file
        'outclip',              # output data to the Windows clipboard
        'help','usage|?',       # help
    );

    my %opt;

lib/Weather/GHCN/App/CacheUtil.pm  view on Meta::CPAN

    use if $OSNAME eq 'MSWin32', 'Win32::Clipboard';

    # is it ok to use Win32::Clipboard?
    our $USE_WINCLIP = $OSNAME eq 'MSWin32';

    # send print output to the Windows clipboard if requested and doable
    outclip() if $Opt->outclip and $USE_WINCLIP;

    ... print stuff
    
    # restore print output to stdout

 view all matches for this distribution


Web-Library-jQueryUI

 view release on metacpan or  search on metacpan

share/1.10.2/css/jquery-ui.min.css  view on Meta::CPAN

/*! jQuery UI - v1.10.2 - 2013-03-14
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.cs...
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper...

 view all matches for this distribution


WebService-NoPaste

 view release on metacpan or  search on metacpan

lib/WebService/NoPaste.pm  view on Meta::CPAN

sub read_from_stdin {
    print "Paste at will...\n" if -t STDIN;
    io('-')->all
}

sub read_from_clipboard { Clipboard->paste }

sub save_to_clipboard { Clipboard->copy($_[0]); }

my $PLEASE_EMAIL = "WebService::NoPaste has only been tested with 'pastebot' brand paste servers, and even then only to a limited extent.  If you got this error unexpectedly, please let me know - rking\@panopic.com.";
sub response_die {
    my ($r, $reason) = @_;
    die join "\n", $reason, $PLEASE_EMAIL, "The response was: " .  $r->as_string

lib/WebService/NoPaste.pm  view on Meta::CPAN

=head1 SYNOPSIS

    # Manually paste input, manually copy the result url:
    $ nopaste

    # Turbo mode: use clipboard as input, send, and then put the result
    # URL back into the clipboard:
    $ nopaste cp

    # Just take the input from the clipboard, but otherwise leave the
    # clipboard alone:
    $ nopaste c

    # Instantly upload your passwd file for the whole world to see, but
    # at least you'll have the result URL conveniently in your
    # clipboard.
    $ nopaste p < /etc/passwd 

=head1 DESCRIPTION

    When online chatting it is problematic to paste an entire 300 line

 view all matches for this distribution


WebService-Pastefire

 view release on metacpan or  search on metacpan

lib/WebService/Pastefire.pm  view on Meta::CPAN

sub paste { my ($self, $str) = @_; #{{{
    substr($str, -3) = '...' if $self->max < length $str;

    my $uri = URI->new($self->url);
    $uri->query_form(
        clipboard => $str,
        email => $self->username,
        pwd => $self->password,
        kexp => $self->expire,
        optin => 0,
    );

 view all matches for this distribution


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