当前位置: 首页>>代码示例>>Python>>正文


Python HiddenScrollbar.get方法代码示例

本文整理汇总了Python中fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar.get方法的典型用法代码示例。如果您正苦于以下问题:Python HiddenScrollbar.get方法的具体用法?Python HiddenScrollbar.get怎么用?Python HiddenScrollbar.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar的用法示例。


在下文中一共展示了HiddenScrollbar.get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: activateMouseModeTool

# 需要导入模块: from fabmetheus_utilities.hidden_scrollbar import HiddenScrollbar [as 别名]
# 或者: from fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar import get [as 别名]
class TableauWindow:
    def activateMouseModeTool(self):
        "Activate the mouse mode tool."
        self.repository.setToDisplaySave()
        self.canvas.focus_set()
        self.createMouseModeTool()
        self.mouseTool.update()

    def addCanvasMenuRootScrollSkein(self, repository, skein, suffix, title):
        "Add the canvas, menu bar, scroll bar, skein panes, tableau repository, root and skein."
        self.imagesDirectoryPath = settings.getPathInFabmetheus(os.path.join("fabmetheus_utilities", "images"))
        self.movementTextID = None
        self.mouseInstantButtons = []
        self.photoImages = {}
        self.repository = repository
        self.root = settings.Tkinter.Tk()
        self.gridPosition = settings.GridVertical(0, 1)
        self.gridPosition.master = self.root
        self.root.title(os.path.basename(skein.fileName) + " - " + title)
        self.rulingExtent = 24
        self.rulingTargetSeparation = 150.0
        self.screenSize = skein.screenSize
        self.skein = skein
        self.skeinPanes = skein.skeinPanes
        self.suffix = suffix
        self.timerID = None
        repository.animationSlideShowRate.value = max(repository.animationSlideShowRate.value, 0.01)
        repository.animationSlideShowRate.value = min(repository.animationSlideShowRate.value, 85.0)
        repository.drawArrows.setUpdateFunction(self.setWindowToDisplaySaveUpdate)
        repository.goAroundExtruderOffTravel.setUpdateFunction(self.setWindowToDisplaySavePhoenixUpdate)
        repository.layerExtraSpan.setUpdateFunction(self.setWindowToDisplaySaveUpdate)
        repository.widthOfSelectionThread.setUpdateFunction(self.setWindowToDisplaySaveUpdate)
        repository.widthOfTravelThread.setUpdateFunction(self.setWindowToDisplaySaveUpdate)
        repository.window = self
        for menuRadio in repository.mouseMode.menuRadios:
            fileName = menuRadio.name.lower()
            fileName = fileName.replace(" ", "_") + ".ppm"
            menuRadio.mouseButton = self.getPhotoButtonGridIncrement(menuRadio.invoke, fileName, self.gridPosition)
        self.gridPosition = settings.GridHorizontal(1, 99)
        self.gridPosition.master = self.root
        self.xScrollbar = HiddenScrollbar(self.root, orient=settings.Tkinter.HORIZONTAL)
        self.xScrollbar.grid(row=98, column=2, columnspan=96, sticky=settings.Tkinter.E + settings.Tkinter.W)
        self.yScrollbar = HiddenScrollbar(self.root)
        self.yScrollbar.grid(row=1, rowspan=97, column=99, sticky=settings.Tkinter.N + settings.Tkinter.S)
        self.canvasHeight = min(
            int(skein.screenSize.imag), self.root.winfo_screenheight() - repository.screenVerticalInset.value
        )
        self.canvasWidth = min(
            int(skein.screenSize.real), self.root.winfo_screenwidth() - repository.screenHorizontalInset.value
        )
        scrollRegionBoundingBox = (0, 0, int(skein.screenSize.real), int(skein.screenSize.imag))
        self.canvas = settings.Tkinter.Canvas(
            self.root,
            highlightthickness=3,
            width=self.canvasWidth,
            height=self.canvasHeight,
            scrollregion=scrollRegionBoundingBox,
        )
        self.canvas.grid(
            row=1,
            rowspan=97,
            column=2,
            columnspan=96,
            sticky=settings.Tkinter.E + settings.Tkinter.W + settings.Tkinter.N + settings.Tkinter.S,
        )
        self.fileHelpMenuBar = settings.FileHelpMenuBar(self.root)
        self.exportMenu = settings.Tkinter.Menu(self.fileHelpMenuBar.fileMenu, tearoff=0)
        self.fileHelpMenuBar.fileMenu.add_cascade(label="Export", menu=self.exportMenu, underline=0)
        exportCanvasPluginsFolderPath = gcodec.getAbsoluteFolderPath(os.path.dirname(__file__), "export_canvas_plugins")
        exportCanvasPluginFileNames = gcodec.getPluginFileNamesFromDirectoryPath(exportCanvasPluginsFolderPath)
        for exportCanvasPluginFileName in exportCanvasPluginFileNames:
            ExportCanvasDialog().addPluginToMenu(
                self.canvas, skein.fileName, self.exportMenu, exportCanvasPluginFileName, suffix
            )
        self.fileHelpMenuBar.fileMenu.add_separator()
        self.fileHelpMenuBar.completeMenu(self.close, repository, self.save, self)

    def addLayer(self, gridPosition):
        "Add the layer frame items."
        self.diveButton = self.getPhotoButtonGridIncrement(self.dive, "dive.ppm", gridPosition)
        self.soarButton = self.getPhotoButtonGridIncrement(self.soar, "soar.ppm", gridPosition)
        gridPosition.increment()
        settings.Tkinter.Label(gridPosition.master, text="Layer:").grid(
            row=gridPosition.row, column=gridPosition.column, sticky=settings.Tkinter.W
        )
        gridPosition.increment()
        self.limitIndex()
        self.layerEntry = settings.Tkinter.Spinbox(
            gridPosition.master,
            command=self.layerEntryReturnPressed,
            from_=0,
            increment=1,
            to=getLengthMinusOneMinimumOne(self.skeinPanes),
        )
        self.layerEntry.bind("<Return>", self.layerEntryReturnPressed)
        self.layerEntry.grid(row=gridPosition.row, column=gridPosition.column, sticky=settings.Tkinter.W)

    def addLine(self, gridPosition):
        "Add the line frame items."
        self.lineDiveButton = self.getPhotoButtonGridIncrement(self.lineDive, "dive.ppm", gridPosition)
#.........这里部分代码省略.........
开发者ID:elmom,项目名称:Skeinforge-Mirror,代码行数:103,代码来源:tableau.py


注:本文中的fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。