Update TextInput start/end entries from BoxSelectTool selection
353495
def callback_box_select(attr, old, new):
    ''''''

    # Get indices of selection
    ind = sorted(new['1d']['indices'])

    if new is None:
        start_input.value = '0'
        end_input.value = '0'
    else:
        start_input.value = str(source.data['ind'][ind[0]])
        end_input.value = str(source.data['ind'][ind[-1]])
        msg = '''
              New start and end index values set.
              '''
        output_window.text = output_template.format(msg)

    return None
361330
protected void onSelectedInstantChanged() {
        if (selectedInstant == null) {
            getInputWidget().setText("");
            anchorLabel();
        } else {
            getInputWidget().setText(getInstantPrinter().print(selectedInstant));
            floatLabel();
        }

        if (instantPickerListener != null)
            instantPickerListener.onInstantChanged(this, selectedInstant);
    }
449394
function pasteHandler(context, event)
        {
            var data = event.clipboardData.getData("Text");
            if (!data)
                return;
            var colonIdx = data.indexOf(":");
            if (colonIdx < 0)
                return;
            var name = data.substring(0, colonIdx).trim();
            var value = data.substring(colonIdx + 1).trim();

            event.preventDefault();

            if (!("originalName" in context)) {
                context.originalName = this.nameElement.textContent;
                context.originalValue = this.valueElement.textContent;
            }
            this.property.name = name;
            this.property.value = value;
            this.nameElement.textContent = name;
            this.valueElement.textContent = value;
            this.nameElement.normalize();
            this.valueElement.normalize();

            this.editingCommitted(event.target.textContent, context, "forward");
        }
614553
def SetSelected( self, node, point=None, propagate=True ):
        """"""
        if node == self.selectedNode:
            return
        self.selectedNode = node
        self.UpdateDrawing()
        if node:
            wx.PostEvent( self, SquareSelectionEvent( node=node, point=point, map=self ) )
1232910
def update(self, event=None, force=False):
        
        line_no = self.text.index(tkinter.INSERT).split(".")[0]

        # if not force:
            # if line_no == self.current_line:
#                 log.critical("no highlight line needed.")
#                 return

#         log.critical("highlight line: %s" % line_no)
#         self.current_line = line_no

        self.text.tag_remove(self.tag_current_line.id, "1.0", "end")
        self.text.tag_add(self.tag_current_line.id, "%s.0" % line_no, "%s.0+1lines" % line_no)
627757
function(iIndex, bSelected) {
			var oTable = this.getTable();
			var oRow = oTable.getRows()[iIndex];

			if (oRow && bSelected != null) {
				TableUtils.toggleRowSelection(oTable, oRow.getIndex(), bSelected);
			}
		}
1366032
function (evt) {
            if (this._inOnBoundPropertyChange) {
                return;
            }
            if (evt.name == "update") {
                if (evt.properties["startDate"]) {
                    this.setProperty("startDate", this._subTplData.settings.startDate);
                }
            } else if (evt.name == "dateClick") {
                this.evalCallback(this._cfg.onclick, evt);
                if (!evt.cancelDefault) {
                    this.dateSelect(evt.date);
                }
            } else if (evt.name == "dateMouseOver") {
                this.evalCallback(this._cfg.onmouseover, evt);
            } else if (evt.name == "dateMouseOut") {
                this.evalCallback(this._cfg.onmouseout, evt);
            }
        }
675517
function prepareSelectAllHack(){if(te.selectionStart!=null){var selected=cm.somethingSelected();var extval='\u200B'+(selected?te.value:"");te.value='\u21DA';// Used to catch context-menu undo
te.value=extval;input.prevInput=selected?"":'\u200B';te.selectionStart=1;te.selectionEnd=extval.length;// Re-set this, in case some other handler touched the
// selection in the meantime.
display.selForContextMenu=cm.doc.sel;}}
953123
function() {
			var self = this;
	
			self.setTextboxValue('');
			self.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});
			self.isInputHidden = true;
		}
1233349
function selectAllText(change: Change): Change {
    const { value } = change;
    const { startBlock } = value;

    return change.moveOffsetsTo(0).extend(startBlock.text.length);
}
1344644
function selectMinuteOnInputElement() {
				inputElement.focus();
				setTimeout(function() {						
					inputElement.get(0).setSelectionRange(inputElement.val().indexOf(settings.separator) + 1, inputElement.val().length);
				}, 1);
			}
1257857
function(input) {
    var start, end;
    switch (this._caretChange) {
      case Caret.SELECT_ALL:
        start = 0;
        end = input.typed.length;
        break;

      case Caret.TO_END:
        start = input.typed.length;
        end = input.typed.length;
        break;

      case Caret.TO_ARG_END:
        // There could be a fancy way to do this involving assignment/arg math
        // but it doesn't seem easy, so we cheat a move the cursor to just before
        // the next space, or the end of the input
        start = input.cursor.start;
        do {
          start++;
        }
        while (start < input.typed.length && input.typed[start - 1] !== ' ');

        end = start;
        break;

      default:
        start = input.cursor.start;
        end = input.cursor.end;
        break;
    }

    start = (start > input.typed.length) ? input.typed.length : start;
    end = (end > input.typed.length) ? input.typed.length : end;

    var newInput = {
      typed: input.typed,
      cursor: { start: start, end: end }
    };

    if (this.terminal.inputElement.selectionStart !== start) {
      this.terminal.inputElement.selectionStart = start;
    }
    if (this.terminal.inputElement.selectionEnd !== end) {
      this.terminal.inputElement.selectionEnd = end;
    }

    this.caretMoved(start);

    this._caretChange = null;
    return newInput;
  }
178078
def OnInsertRows(self, event):
        """"""

        bbox = self.grid.selection.get_bbox()

        if bbox is None or bbox[1][0] is None:
            # Insert rows at cursor
            ins_point = self.grid.actions.cursor[0] - 1
            no_rows = 1
        else:
            # Insert at lower edge of bounding box
            ins_point = bbox[0][0] - 1
            no_rows = self._get_no_rowscols(bbox)[0]

        with undo.group(_("Insert rows")):
            self.grid.actions.insert_rows(ins_point, no_rows)

        self.grid.GetTable().ResetView()

        # Update the default sized cell sizes
        self.grid.actions.zoom()

        event.Skip()
736622
def __buttonEvent(event):
    
    global  boxRoot, __widgetTexts, __replyButtonText
    __replyButtonText = __widgetTexts[event.widget]
    boxRoot.quit()
1219106
function updateSelection(cm) {
    var display = cm.display;
    var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to);
    if (collapsed || cm.options.showCursorWhenSelecting)
      updateSelectionCursor(cm);
    else
      display.cursor.style.display = display.otherCursor.style.display = "none";
    if (!collapsed)
      updateSelectionRange(cm);
    else
      display.selectionDiv.style.display = "none";

    // Move the hidden textarea near the cursor to prevent scrolling artifacts
    if (cm.options.moveInputWithCursor) {
      var headPos = cursorCoords(cm, cm.doc.sel.head, "div");
      var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv);
      display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
                                                        headPos.top + lineOff.top - wrapOff.top)) + "px";
      display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
                                                         headPos.left + lineOff.left - wrapOff.left)) + "px";
    }
  }
1268789
def __restore_selection(self, start_pos, end_pos):
        """"""
        cursor = self.textCursor()
        cursor.setPosition(start_pos)
        cursor.setPosition(end_pos, QTextCursor.KeepAnchor)
        self.setTextCursor(cursor)
963956
function updateOptions( $elem, prev, curr ) {
        var bselect = _callMethod( $elem, "element" );

        $.each( prev, function(key, val) {
            if ( curr[ key ] !== val ) {
                if ( key === "size" ) {
                    var sizes = $.map( bootstrapButtonSizes.slice( 0 ), function( size ) {
                        return "bselect-" + size;
                    }).join( " " );

                    bselect.removeClass( sizes );
                    if ( bootstrapButtonSizes.indexOf( curr.size ) > -1 ) {
                        bselect.addClass( "bselect-" + curr.size );
                    }
                }
            }
        });
    }