Add a slide to the slideshow.

@param Slide $slide
11309
public function addSlide(Slide $slide)
    {
        if (!$this->slides->contains($slide)) {
            $this->slides->add($slide);
            $slide->setSlideshow($this);
        }
    }
828075
def load(self, slide):
        
        self._direction = getattr(QtGui.QBoxLayout,
                                  slide.attributes().get('direction', 'TopToBottom'),
                                  QtGui.QBoxLayout.TopToBottom)
        
        for item in slide.items():
            graphic = self.addGraphic(item.attributes().get('type', 'basic'))
            if graphic is not None:
                graphic.load(item)
149460
function addAction(codemirror, slideNumer, action) {
    // parse properties from the new actions to next compare with
    // the current ones in the slide
    var currentActions = O.Template.parseProperties(action);
    var currentLine;
    var c = 0;
    var blockStart;

    // search for a actions block
    for (var i = slideNumer + 1; i < codemirror.lineCount(); ++i) {
      var line = codemirror.getLineHandle(i).text;
      if (ACTIONS_BLOCK_REGEXP.exec(line)) {
        if (++c === 2) {
          // parse current slide properties
          var slideActions = O.Template.parseProperties(getLines(codemirror, blockStart, i));
          var updatedActions = {};

          // search for the same in the slides
          for (var k in currentActions) {
            if (k in slideActions) {
              updatedActions[k] = currentActions[k];
            }
          }

          // remove the ones that need update
          for (var k in updatedActions) {
            for (var linePos = blockStart + 1; linePos < i; ++linePos) {
              if (k in O.Template.parseProperties(codemirror.getLine(linePos))) {
                codemirror.removeLine(linePos);
                i -= 1;
              }
            }
          }

          // insert in the previous line
          currentLine = codemirror.getLineHandle(i);
          codemirror.setLine(i, action + "\n" + currentLine.text);
          return;
        } else {
          blockStart = i;
        }
      } else if(SLIDE_REGEXP.exec(line)) {
        // not found, insert a block
        currentLine = codemirror.getLineHandle(slideNumer);
        codemirror.setLine(slideNumer, currentLine.text + "\n```\n" + action +"\n```\n");
        return;
      }
    }
    // insert at the end
    currentLine = codemirror.getLineHandle(slideNumer);
    codemirror.setLine(slideNumer, currentLine.text + "\n```\n"+ action + "\n```\n");
  }
294700
function(e) {
	    var n = this._findSlideIndex(this.current_id);
		var slide_background = this._slides[n].getBackground();
		this.changeBackground(e);
		this.fire("colorchange", slide_background);
	}
1013478
public function addSlide(SlideInterface $slides)
    {
        $this->slides[] = $slides;
        $slides->setSlider($this);
        return $this;
    }
1116131
function changeActiveSlideTo (i) {
        slides.children(':nth-child(' + ((vars.currentIndex + 1) || 0) + ')').removeClass('itemslide-active');

        slides.children(':nth-child(' + ((i + 1) || 0) + ')').addClass('itemslide-active'); //Change destination index to active

        //Check if landingIndex is different from currentIndex
        if (i != options.currentIndex) {
            vars.currentIndex = i; //Set current index to landing index
            slides.trigger('changeActiveIndex');
        }
    }
1211631
public void setOnSlideClickListener(OnSlideClickListener slideClickListener) {
        this.slideClickListener = slideClickListener;
        if (slideClickListener != null) {
            setClickable(true);
            setOnClickListener(this);
        } else {
            setClickable(false);
            setOnClickListener(null);
        }
    }
991581
public void slideTo()
	{
		int l = size().width() - SLIDER_WIDTH;
		int pos = MathHelper.clamp(mousePosition().x() - SLIDER_WIDTH / 2, 0, l);
		slideTo((float) pos / l);
	}
1093993
@NonNull
    private static SliderPanel attachSliderPanel(@NonNull Activity activity, @NonNull SlidrConfig config) {
        // Hijack the decorview
        ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
        View oldScreen = decorView.getChildAt(0);
        decorView.removeViewAt(0);

        // Setup the slider panel and attach it to the decor
        SliderPanel panel = new SliderPanel(activity, oldScreen, config);
        panel.setId(R.id.slidable_panel);
        oldScreen.setId(R.id.slidable_content);
        panel.addView(oldScreen);
        decorView.addView(panel, 0);
        return panel;
    }
210942
public function init() {
		
		if (!isset($this->htmlOptions['id'])) {
			$this->htmlOptions['id'] = $this->getId();
		}

		$classes = array('carousel');

		if ($this->slide === true) {
			$classes[] = 'slide';
		}

		if (!empty($classes)) {
			$classes = implode(' ', $classes);
			if (isset($this->htmlOptions['class'])) {
				$this->htmlOptions['class'] .= ' ' . $classes;
			} else {
				$this->htmlOptions['class'] = $classes;
			}
		}
	}
577955
function apply(slides) {
      for (var i = 0, len = slides.length; i < len; i++) {
        var style = slides[i].style;
        var direction = Components.Direction.value;

        if (i !== 0) {
          style[MARGIN_TYPE[direction][0]] = this.value / 2 + 'px';
        } else {
          style[MARGIN_TYPE[direction][0]] = '';
        }

        if (i !== slides.length - 1) {
          style[MARGIN_TYPE[direction][1]] = this.value / 2 + 'px';
        } else {
          style[MARGIN_TYPE[direction][1]] = '';
        }
      }
    }
1211637
def add_slide(self, slide_layout):
        
        partname = self._next_slide_partname
        slide_layout_part = slide_layout.part
        slide_part = SlidePart.new(partname, self.package, slide_layout_part)
        rId = self.relate_to(slide_part, RT.SLIDE)
        return rId, slide_part.slide
477005
public function append($resource)
    {
        parent::append($resource);
        if ($this->totalCount !== null) {
            $this->setTotalCount($this->totalCount);
        }
    }
1215440
def add_cell(preso, pos, width, height, padding=1, top_margin=4, left_margin=2):
    
    available_width = SLIDE_WIDTH
    available_width -= left_margin * 2
    available_width -= padding * (width - 1)
    column_width = available_width / width
    avail_height = SLIDE_HEIGHT
    avail_height -= top_margin
    avail_height -= padding * (height - 1)
    column_height = avail_height / height

    col_pos = int((pos - 1) % width)
    row_pos = int((pos - 1) / width)

    w = "{}cm".format(column_width)
    h = "{}cm".format(column_height)
    x = "{}cm".format(left_margin + (col_pos * column_width + (col_pos) * padding))
    y = "{}cm".format(top_margin + (row_pos * column_height + (row_pos) * padding))
    attr = {
        "presentation:class": "outline",
        "presentation:style-name": "Default-outline1",
        "svg:width": w,
        "svg:height": h,
        "svg:x": x,
        "svg:y": y,
    }
    preso.slides[-1].add_text_frame(attr)
    preso.slides[-1].grid_w_h_x_y = (w, h, x, y)
744858
function moveTo(priv, index) {
  check(priv.started, 'slider.started').is.True();
  check(index, 'index').is.inRange(0, priv.slides.length)();

  var toIndex = index <= priv.slides.length? index % priv.slides.length: index;
  if (priv.toIndex === toIndex) {
    return;
  }

  removeTempClasses(priv);
  removeMarkers(priv);

  priv.fromIndex = priv.toIndex;
  priv.toIndex = toIndex;

  addMarkers(priv);
  addTempClasses(priv);

  priv.phaser.startTransition();
  emitEvent(priv, slidechange(priv.fromIndex, priv.toIndex));
}
474743
function(prezContents, cb) {
      var slideChunksPreTpl = prezContents.toString().split(slideBreakAt);
      _.forEach(slideChunksPreTpl, function(chunk) {
        opts.slides.push({
          preHtml: chunk,
          indented: opts.slides.length && isIndented(chunk)
        });
      });
      cb(null, opts);
    }
1220584
protected void playSlide(int currentPosition, int previousPosition) {
        final SlideStatus slideStatus = adapter.getSlideStatus(currentPosition);
        final PlayList pl = getPlaylist();

        // Don't play anything if we have reached the end
        if (currentPosition < 0) {
            stop();
            return;
        }

        // Stop anything planned
        slideHandler.removeCallbacksAndMessages(null);

        // If the slide is ready, then we can display it straight away
        switch (slideStatus) {
            case READY:
                notAvailableSlidesSkipped = 0;

                // We are playing the slide show!
                status = Status.PLAYING;

                // Schedule next slide
                if (pl.isAutoAdvanceEnabled()) {
                    slideHandler.postDelayed(moveToNextSlide, pl.getSlideDuration(currentPosition));
                }

                // Display the slide
                displaySlide(currentPosition, previousPosition);

                break;

            case NOT_AVAILABLE:
                Log.w("SlideShowView", "Slide is not available: " + currentPosition);

                // Stop if we have already skipped all slides
                ++notAvailableSlidesSkipped;
                if (notAvailableSlidesSkipped < adapter.getCount()) {
                    prepareSlide(pl.getNextSlide());
                    next();
                } else {
                    Log.w("SlideShowView", "Skipped too many slides in a row. Stopping playback.");
                    stop();
                }
                break;

            case LOADING:
                Log.d("SlideShowView", "Slide is not yet ready, waiting for it: " + currentPosition);

                // Show an indicator to the user
                showProgressIndicator();

                // Start waiting for the slide to be available
                waitForCurrentSlide.startWaiting(currentPosition, previousPosition);

                break;
        }
    }