-
- sizer.Add(self.pdf, proportion=1, flag=wx.EXPAND)
-
- btn = wx.Button(self, wx.NewId(), "Open PDF File")
- self.Bind(wx.EVT_BUTTON, self.OnOpenButton, btn)
- btnSizer.Add(btn, proportion=1, flag=wx.EXPAND|wx.ALL, border=5)
-
- btn = wx.Button(self, wx.NewId(), "<-- Previous Page")
- self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn)
- btnSizer.Add(btn, proportion=1, flag=wx.EXPAND|wx.ALL, border=5)
-
- btn = wx.Button(self, wx.NewId(), "Next Page -->")
- self.Bind(wx.EVT_BUTTON, self.OnNextPageButton, btn)
- btnSizer.Add(btn, proportion=1, flag=wx.EXPAND|wx.ALL, border=5)
-
-
- btnSizer.Add((50,-1), proportion=2, flag=wx.EXPAND)
- sizer.Add(btnSizer, proportion=0, flag=wx.EXPAND)
-
- self.SetSizer(sizer)
+ leftsizer.Add(self.pdf, proportion=1, flag=wx.EXPAND)
+
+ box = wx.StaticBox(self, wx.NewId(), "" )
+ buttonsizer = wx.StaticBoxSizer(box, wx.HORIZONTAL )
+
+ b1 = wx.Button(self, wx.NewId(), "First")
+ buttonsizer.Add(b1, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ self.Bind(wx.EVT_BUTTON, self.OnFirstPageButton, b1)
+
+ b2 = wx.Button(self, wx.NewId(), "Previous")
+ buttonsizer.Add(b2, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ self.Bind(wx.EVT_BUTTON, self.OnPreviousPageButton, b2)
+
+ tx1 = wx.StaticText(self, wx.NewId(), " Go to page" )
+ buttonsizer.Add(tx1, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ tc1 = wx.TextCtrl(self, wx.NewId(), "0", size=[30,-1])
+ buttonsizer.Add( tc1, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ self.Bind(wx.EVT_TEXT, self.OnGotoPage, tc1)
+
+ b3 = wx.Button(self, wx.NewId(), "Next")
+ buttonsizer.Add(b3, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ self.Bind(wx.EVT_BUTTON, self.OnNextPageButton, b3)
+
+ b4 = wx.Button(self, wx.NewId(), "Last")
+ buttonsizer.Add(b4, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ self.Bind(wx.EVT_BUTTON, self.OnLastPageButton, b4)
+
+ tx2 = wx.StaticText(self, wx.NewId(), " Zoom")
+ buttonsizer.Add(tx2, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+
+ ch1 = wx.Choice(self, wx.NewId(),
+ choices=["Default", "Fit", "FitH", "FitV",
+ "25%", "50%", "75%", "100%", "125%", "200%", "400%"])
+ ch1.SetSelection(0)
+ buttonsizer.Add(ch1, proportion=0, flag=wx.ALIGN_CENTER|wx.ALL, border=5)
+ self.Bind(wx.EVT_CHOICE, self.OnZoom, ch1)
+
+ leftsizer.Add(buttonsizer, proportion=0)
+ mainsizer.Add(leftsizer, proportion=1, flag=wx.GROW|wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, border=5)
+
+ box = wx.StaticBox(self, wx.NewId(), "" )
+ rightsizer = wx.StaticBoxSizer(box, wx.VERTICAL)
+
+ b5 = wx.Button(self, wx.NewId(), "Load PDF")
+ rightsizer.Add(b5, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+ self.Bind(wx.EVT_BUTTON, self.OnLoadButton, b5)
+
+ b6 = wx.Button(self, wx.NewId(), "Print")
+ rightsizer.Add(b6, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+ self.Bind(wx.EVT_BUTTON, self.OnPrintButton, b6)
+
+ tx3 = wx.StaticText(self, wx.NewId(), "Page mode:")
+ rightsizer.Add(tx3, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+
+ ch2 = wx.Choice(self, wx.NewId(),size=[100,-1],
+ choices=["None", "Bookmarks", "Thumbs"])
+ ch2.SetSelection(0)
+ rightsizer.Add(ch2, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+ self.Bind(wx.EVT_CHOICE, self.OnPageMode, ch2)
+
+ tx4 = wx.StaticText(self, wx.NewId(), "Layout mode:")
+ rightsizer.Add(tx4, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+
+ ch3 = wx.Choice(self, wx.NewId(),size=[100,-1],
+ choices=["DontCare", "SinglePage",
+ "OneColumn", "TwoColumnLeft", "TwoColumnRight" ])
+ ch3.SetSelection(0)
+ rightsizer.Add(ch3, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+ self.Bind(wx.EVT_CHOICE, self.OnLayoutMode, ch3)
+
+ cx1 = wx.CheckBox(self, wx.NewId(), "Toolbar")
+ cx1.SetValue( True )
+ rightsizer.Add( cx1,proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+ self.Bind(wx.EVT_CHECKBOX, self.OnToolbar, cx1)
+
+ cx2 = wx.CheckBox(self, wx.NewId(), "Scrollbars")
+ cx2.SetValue( True )
+ rightsizer.Add( cx2,proportion=0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=5)
+ self.Bind(wx.EVT_CHECKBOX, self.OnScrollbars, cx2)
+
+ mainsizer.Add( rightsizer, proportion=0, flag=wx.ALL, border=15)
+ self.SetSizer(mainsizer)