def __init__(self, parent, story): PnlEditorPage.__init__(self, parent) Observer.__init__(self) self.__story = story self.splitWin = wx.SplitterWindow(self) self.pnlMedias = PnlMediaContainer(self.splitWin) self.pnlMedias.SetupScrolling(scroll_x=False) self.pnlMedias.Bind(wx.EVT_CHAR_HOOK, self._OnKeyDown) self.treeCtrlr = TreeController(story, self.pnlMedias, self) self.pnlNotification = PnlNotification(self) self.pnlGuide = PnlStoryGuide(self.splitWin) self.pnlGuide.Bind(wx.html.EVT_HTML_LINK_CLICKED, self._OnLinkClicked) szMain = wx.BoxSizer(wx.VERTICAL) szMain.Add(self.splitWin, 1, wx.EXPAND, 0) szMain.Add(self.pnlNotification, 0, wx.EXPAND) self.pnlNotification.Show(False) self.SetSizer(szMain) self.splitWin.SplitVertically(self.pnlMedias, self.pnlGuide, -600)
def __init__(self, parent, project): self._init_ctrls(parent) Observer.__init__(self) self.lvPics.SetDropTarget(ImageDropTarget(self)) self.imgProxyLeft = None self.imgProxyRight = None self.__project = project self.__hasChanged = False self.__usedAltPath = False self.__InitImageProxy() self.bitmapLeft.SetAspect(project.GetAspect()) self.bitmapRight.SetAspect(project.GetAspect()) self.pnlAddPics.GetButton().Bind(wx.EVT_BUTTON, self.OnImportPics) self.pnlAddPics.stInfo.SetDropTarget(ImageDropTarget(self)) self.cmdMoveLeft.Enable(False) self.cmdMoveRight.Enable(False) self.cmdRemove.Enable(False) self.panelTop.Show(False) self.Bind(EVT_RECT_CHANGED, self.OnRectChanged, id=self.bitmapLeft.GetId()) self.Bind(EVT_RECT_CHANGED, self.OnRectChanged, id=self.bitmapRight.GetId()) self.Bind(EVT_CHANGED, self.OnPhotoFilmStripListChanged, id=self.lvPics.GetId()) project.AddObserver(self) self.SetInitialSize(self.GetEffectiveMinSize()) self.SetChanged(False)
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name='panel'): wx.Panel.__init__(self, parent, id, pos, size, style, name) Observer.__init__(self) self.SetMinSize(wx.Size(200, 150)) self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) self.RATIO = 16.0 / 9.0 self._imgProxy = None self._sectRect = wx.Rect(0, 0, 1280, 720) self._zoom = 1 self._infoTimer = wx.Timer(self) self._lastRectUpdate = 0 self._action = None self._startX = None self._startY = None self._startRect = None self._lock = True self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_MOTION, self.OnMotion) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp) self.Bind(wx.EVT_SIZE, self.OnResize) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) self.Bind(wx.EVT_TIMER, self.OnInfoTimer) self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self.OnCaptureLost)
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name='panel'): wx.Panel.__init__(self, parent, id, pos, size, style, name) Observer.__init__(self) self.SetSizeHints(200, 150) self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) self.RATIO = 16.0 / 9.0 self._imgProxy = None self._sectRect = wx.Rect(0, 0, 1280, 720) self._zoom = 1 self._infoTimer = wx.Timer(self) self._lastRectUpdate = 0 self._action = None self._startX = None self._startY = None self._startRect = None self._lock = True self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_MOTION, self.OnMotion) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp) self.Bind(wx.EVT_SIZE, self.OnResize) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) self.Bind(wx.EVT_TIMER, self.OnInfoTimer) self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self.OnCaptureLost)
def __init__(self, parent, project): PnlEditorPage.__init__(self, parent, id=wxID_PNLPFSPROJECT, name="PnlPfsProject") self.SetClientSize(wx.Size(400, 250)) self._InitCtrls() Observer.__init__(self) self.lvPics.SetDropTarget(ImageDropTarget(self)) self.imgProxyLeft = None self.imgProxyRight = None self.__project = project self.__usedAltPath = False self._InitImageProxy() self.bitmapLeft.SetAspect(project.GetAspect()) self.bitmapRight.SetAspect(project.GetAspect()) self.pnlAddPics.GetButton().Bind(wx.EVT_BUTTON, self.OnImportPics) self.pnlAddPics.stInfo.SetDropTarget(ImageDropTarget(self)) self.cmdMoveLeft.Enable(False) self.cmdMoveRight.Enable(False) self.cmdRemove.Enable(False) self.panelTop.Show(False) self.Bind(EVT_RECT_CHANGED, self.OnRectChanged, id=self.bitmapLeft.GetId()) self.Bind(EVT_RECT_CHANGED, self.OnRectChanged, id=self.bitmapRight.GetId()) self.Bind(EVT_CHANGED, self.OnPhotoFilmStripListChanged, id=self.lvPics.GetId()) project.AddObserver(self) self.pnlEditPicture.SetupModeByProject(project) self.SetInitialSize(self.GetEffectiveMinSize()) self.SetChanged(False)
def __init__(self, parent, story): PnlEditorPage.__init__(self, parent) Observer.__init__(self) self.__story = story self.pnlMedias = PnlMediaContainer(self) self.pnlMedias.SetupScrolling(scroll_x=False) self.pnlMedias.Bind(wx.EVT_CHAR_HOOK, self._OnKeyDown) self.treeCtrlr = TreeController(story, self.pnlMedias, self) self.pnlNotification = PnlNotification(self) szMain = wx.BoxSizer(wx.VERTICAL) szMain.Add(self.pnlMedias, 1, wx.EXPAND, 0) szMain.Add(self.pnlNotification, 0, wx.EXPAND) self.pnlNotification.Show(False) self.SetSizer(szMain)
def __init__(self, parent, project): self._init_ctrls(parent) Observer.__init__(self) self.lvPics.SetDropTarget(ImageDropTarget(self)) self.imgProxyLeft = None self.imgProxyRight = None self.__project = project self.__usedAltPath = False self.__InitImageProxy() self.bitmapLeft.SetAspect(project.GetAspect()) self.bitmapRight.SetAspect(project.GetAspect()) self.pnlAddPics.GetButton().Bind(wx.EVT_BUTTON, self.OnImportPics) self.pnlAddPics.stInfo.SetDropTarget(ImageDropTarget(self)) self.cmdMoveLeft.Enable(False) self.cmdMoveRight.Enable(False) self.cmdRemove.Enable(False) self.panelTop.Show(False) self.Bind(EVT_RECT_CHANGED, self.OnRectChanged, id=self.bitmapLeft.GetId()) self.Bind(EVT_RECT_CHANGED, self.OnRectChanged, id=self.bitmapRight.GetId()) self.Bind(EVT_CHANGED, self.OnPhotoFilmStripListChanged, id=self.lvPics.GetId()) project.AddObserver(self) self.SetInitialSize(self.GetEffectiveMinSize()) self.SetChanged(False)
def __init__(self): Observer.__init__(self) self._maxProgress = 100 self._curProgress = 0 self._info = u""