/[gzz]/gzz/Gzz.py
ViewVC logotype

Diff of /gzz/Gzz.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by benja, Thu Oct 3 08:37:19 2002 UTC revision 1.41 by benja, Sat Oct 5 13:59:47 2002 UTC
# Line 30  class Gzz(java.lang.Runnable): Line 30  class Gzz(java.lang.Runnable):
30      transient = 0      transient = 0
31    
32      def run(self):      def run(self):
         # if System.getProperty("gzzclient") == "gl":  
         #   import gzz.gfx.gl.debugswitches  
         #   gzz.gfx.gl.debugswitches.DebugSwitches(gldbg)  
33          self.style = self.graphicsAPI.getTextStyle("SansSerif", java.awt.Font.PLAIN, 10);          self.style = self.graphicsAPI.getTextStyle("SansSerif", java.awt.Font.PLAIN, 10);
         xubuoy = gzz.view.xubuoy.XuPDF_ViewBinder()  
34          self.views = [gzz.view.VobVanishingClient(),          self.views = [gzz.view.VobVanishingClient(),
35                        # gzz.view.RowColView(0), gzz.view.RowColView(1), #don't work                        gzz.view.RowColView(0), gzz.view.RowColView(1),
36                        gzz.view.FullScreenView(), xubuoy]                        ]
37          self.viewSpecificBinders = java.util.HashMap()          self.viewSpecificBinders = java.util.HashMap()
         self.viewSpecificBinders.put(xubuoy, xubuoy)  
38          self.cellView = gzz.view.CellVobFactory()          self.cellView = gzz.view.CellVobFactory()
39          self.cellContentView = gzz.view.MultitypeCellContentView(gzz.view.TextCellContentView(self.style), gzz.view.pagespanview.ContentView())          self.cellContentView  = gzz.view.TextCellContentView(self.style)
40            if self.gl:
41                xubuoy = gzz.view.xubuoy.XuPDF_ViewBinder()
42                self.views.append(xubuoy)
43                self.viewSpecificBinders.put(xubuoy, xubuoy)
44                self.cellContentView = gzz.view.MultitypeCellContentView(
45                    self.cellContentView, gzz.view.pagespanview.ContentView())
46                
47          gzz.client.Fallback(self.space.getHomeCell(), self.linkSpace,          gzz.client.Fallback(self.space.getHomeCell(), self.linkSpace,
48                              self.dimensions, self.views,                              self.dimensions, self.views,
49                              self.viewSpecificBinders, self.cellView,                              self.viewSpecificBinders, self.cellView,
# Line 53  class Gzz(java.lang.Runnable): Line 55  class Gzz(java.lang.Runnable):
55          for o,a in self.opts:          for o,a in self.opts:
56              if o in ("-C", "--commander"):              if o in ("-C", "--commander"):
57                  gzz.control.commander.AwtCommander(globals())                  gzz.control.commander.AwtCommander(globals())
             if o in gzz.util.dbg.all:  
                 gzz.util.dbg.option(o,a)  
58              if o in ("-t", "--transient"):              if o in ("-t", "--transient"):
59                  self.transient = 1                  self.transient = 1
60    
# Line 141  class Gzz(java.lang.Runnable): Line 141  class Gzz(java.lang.Runnable):
141          except TypeError, t:          except TypeError, t:
142              print t              print t
143    
144      def __init__(self, opts, args):      def __init__(self, opts, args, gl):
145          self.opts, self.args = opts, args          self.opts, self.args = opts, args
146            self.gl = gl
147          self.parse_params()          self.parse_params()
148          self.set_defaults()          self.set_defaults()
149    
150  def run():  def run():
151      opts, args = getopt.getopt(sys.argv[1:], "Ct"+gzz.util.dbg.short,      opts, args = getopt.getopt(sys.argv[1:], "Ct"+gzz.util.dbg.short,
152              ["--commander"]+gzz.util.dbg.long)              ["--commander"]+gzz.util.dbg.long)
153      g = Gzz(opts, args)  
154      if java.lang.System.getProperty("gzzclient") == "gl":      for o,a in opts:
155            if o in gzz.util.dbg.all:
156                gzz.util.dbg.option(o,a)
157                
158        if gzz.client.GraphicsAPI.getTypeString() == "gl":
159          print "Running GL..."          print "Running GL..."
160            g = Gzz(opts, args, 1)
161          g.graphicsAPI.startUpdateManager(g)          g.graphicsAPI.startUpdateManager(g)
162      else:      else:
163          print "Running AWT..."          print "Running AWT..."
164            g = Gzz(opts, args, 0)
165          g.graphicsAPI.startUpdateManager(None)          g.graphicsAPI.startUpdateManager(None)
166          g.run()          g.run()
167    

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26