def visit_section(self, node): self.hide_title = self.default_hide_title self.transition = self.default_transition title_pile = slide.SlidePile([]) title_pad = slide.SlidePadding(title_pile, align='center', width='pack') main_pile = slide.SlidePile([]) main_pad = slide.SlidePadding(main_pile, align='center', width='pack') outer_pile = slide.SlidePile([ ('pack', title_pad), ('pack', main_pad), ]) s = slide.UrwidSlide(u'', self.transition, outer_pile, self.palette['_default']) self.slide = s self.stack.append(main_pile) self.title_pile = title_pile pile = slide.SlidePile([]) s = slide.Handout(pile, self.palette['_default']) self.handout = s self.handout_pile = pile self.slide.handout = s
def main(): import PIL.Image img = PIL.Image.open('/tmp/p/8.jpg') img.load() hinter = slide.ScreenHinter() hinter.set_cols_rows((80, 25)) w = ANSIImage(img, hinter) slpile = slide.SlidePile([]) slpile.contents.append((w, slpile.options())) pad = slide.SlidePadding(slpile, align='center', width='pack') fill = slide.SlideFiller(pad) #w.render((80,25)) fill.render((80, 25)) screen = urwid.raw_display.Screen() if True: with screen.start(): screen.draw_screen((80, 25), fill.render((80, 25))) raw_input()
def visit_container(self, node): self.stack.append(slide.SlidePile([])) if 'progressive' in node.get('classes'): self.progressives.append(self.slide.progressives) self.slide.progressive_attr = self.palette['progressive']
def visit_line_block(self, node): self.stack.append(slide.SlidePile([]))
def visit_entry(self, node): self.stack.append(slide.SlidePile([]))
def visit_tgroup(self, node): self.table_columns.append([]) self.stack.append(slide.SlidePile([]))
def visit_list_item(self, node): self.stack.append(slide.SlidePile([]))
def visit_block_quote(self, node): self.stack.append(slide.SlidePile([]))