Mark or unmark a star as selected.  (fromtable)==True if the
        selection action came from the table (instead of the star plot).
427772
def mark_selection(self, star, fromtable=False):
        
        self.logger.debug("star selected name=%s ra=%s dec=%s" % (
            star['name'], star['ra'], star['dec']))

        if star in self.selected:
            # Item is already selected--so unselect it
            self.selected.remove(star)
            try:
                # remove selection from table
                self._unselect_tv(star, fromtable=fromtable)
            except Exception as e:
                self.logger.warning("Error unhilighting star: %s" % (str(e)))

            self.catalog.update_selected()
            return False
        else:
            if self.selection_mode == 'single':
                # if selection mode is 'single' unselect any existing selection
                for star2 in self.selected:
                    self.selected.remove(star2)
                    try:
                        self._unselect_tv(star2, fromtable=fromtable)
                    except Exception as e:
                        self.logger.warning(
                            "Error unhilighting star: %s" % (str(e)))
            self.selected.append(star)
            try:
                # highlight line in table
                self._select_tv(star, fromtable=fromtable)
                if self.catalog.pan_to_selected:
                    self.catalog.pan_to_star(star)
            except Exception as e:
                self.logger.warning("Error hilighting star: %s" % (str(e)))

            self.catalog.update_selected()
            return True
587834
def on_tblFunctions1_itemSelectionChanged(self):
        
        # Clear the selection on the 2nd matrix
        self.parent.step_fc_functions2.tblFunctions2.clearContents()
        self.parent.step_fc_functions2.lblAvailableFunctions2.clear()
        self.parent.pbnNext.setEnabled(True)

        # Put a dot to the selected cell - note there is no way
        # to center an icon without using a custom ItemDelegate
        selection = self.tblFunctions1.selectedItems()
        selItem = (len(selection) == 1) and selection[0] or None
        for row in range(self.tblFunctions1.rowCount()):
            for column in range(self.tblFunctions1.columnCount()):
                item = self.tblFunctions1.item(row, column)
                item.setText((item == selItem) and '•' or '')
205467
def __SetMark(self, mark=None):
        ""
        if mark is None:
            mark = self.__mark
        self.SetSelection(mark, mark)
1250552
protected boolean markFrame(final int lit) {
        final int currentlevel = var(lit).level();
        final CLFrame frame = this.control.get(currentlevel);
        if (frame.mark()) { return false; }
        frame.setMark(true);
        this.frames.push(currentlevel);
        return true;
    }
1198811
def ctrl_a
      mark = marked_items.size != (items.size - 2)  # exclude . and ..
      items.each {|i| i.toggle_mark unless i.marked? == mark}
      draw_items
      draw_marked_items
      move_cursor current_row
    end
1238024
public void onFeatureSelected(FeatureSelectedEvent event) {
		Feature feature = event.getFeature();

		// Only select if it is actually deselected:
		boolean selected = false;
		ListGridRecord[] selections = getSelection();
		for (ListGridRecord selection : selections) {
			if (selection.getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) {
				selected = true;
				break;
			}
		}

		// If deselected, find the correct row and select:
		if (!selected) {
			ListGridRecord[] records = this.getRecords();
			for (int i = 0; i < records.length; i++) {
				if (records[i].getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) {
					selectRecord(i);
					break;
				}
			}
		}
	}
1261410
def remove_row_selection_interval ix0, ix1
      @anchor_selection_index = ix0
      @lead_selection_index = ix1
      arr = @selected_indices.dup # to un highlight
      @selected_indices.delete_if {|x| x >= ix0 and x <= ix1 }
      arr.each {|i| @obj.fire_row_changed(i) }
      lse = ListSelectionEvent.new(ix0, ix1, @obj, :DELETE)
      @obj.fire_handler :LIST_SELECTION_EVENT, lse
    end
432722
def quote_selection(self):
        """"""

        selection = self.get_selection()
        current_table = self.grid.current_table
        for row, col, tab in self.grid.code_array.dict_grid.keys():
            if tab == current_table and (row, col) in selection:
                self.grid.actions.quote_code((row, col, tab))

        self.grid.code_array.result_cache.clear()
1082570
function isSelectionOutOfTable(opts: Options, value: Value): boolean {
    if (!value.selection.startKey) return false;

    const { startKey, endKey } = value;

    const startPosition = TablePosition.create(opts, value.document, startKey);
    const endPosition = TablePosition.create(opts, value.document, endKey);

    // Only handle events in tables
    return !startPosition.isInTable() && !endPosition.isInTable();
}
331798
def on_table_row_click(self, row, item):
        ''' '''
        if hasattr(self, "last_clicked_row"):
            del self.last_clicked_row.style['outline']
        self.last_clicked_row = row
        self.last_clicked_row.style['outline'] = "2px dotted blue"
        return (row, item)
379233
function(feature) {
        delete this.features[feature.fid || feature.id];
        this.events.triggerEvent("featureunselected", {feature: feature});
    }
164518
def select_point(action, action_space, select_point_act, screen):
  """"""
  select = spatial(action, action_space).unit_selection_point
  screen.assign_to(select.selection_screen_coord)
  select.type = select_point_act
624376
def copy_action_callback(self, *event):
        """"""
        if react_to_event(self.view, self.tree_view, event) and self.active_entry_widget is None:
            sm_selection, sm_selected_model_list = self.get_state_machine_selection()
            # only list specific elements are copied by widget
            if sm_selection is not None:
                sm_selection.set(sm_selected_model_list)
                global_clipboard.copy(sm_selection)
                return True
887420
def onselection(self, widget):
        """"""
        self._selected_key = None
        for k in self.children:
            if self.children[k] == widget:  # widget is the selected ListItem
                self._selected_key = k
                if (self._selected_item is not None) and self._selectable:
                    self._selected_item.attributes['selected'] = False
                self._selected_item = self.children[self._selected_key]
                if self._selectable:
                    self._selected_item.attributes['selected'] = True
                break
        return (self._selected_key,)
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 ) )
525902
function endSelection() {
          var rng = doc.selection.createRange();

          // If the range is collapsed then use the last start range
          if (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {
            startRng.select();
          }

          dom.unbind(doc, 'mouseup', endSelection);
          dom.unbind(doc, 'mousemove', selectionChange);
          startRng = started = 0;
        }
367367
public void unmark() {
    // check if it's marked before removing the style class
    if (marked) {
      preferencesGroup.getRenderer().removeStyleClass(MARKED_STYLE_CLASS);
      preferencesGroup.getRenderer().getTitleLabel().removeEventHandler(
          MouseEvent.MOUSE_EXITED, unmarker
      );
      marked = !marked;
    }
  }