/[gnue]/gnue-designer/src/forms/LayoutEditor/renderers/Base/Driver.py
ViewVC logotype

Diff of /gnue-designer/src/forms/LayoutEditor/renderers/Base/Driver.py

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

revision 1.1 by jcater, Fri Aug 22 18:39:18 2003 UTC revision 1.1.4.1 by jcater, Sat Aug 23 00:04:42 2003 UTC
# Line 19  Line 19 
19  # Copyright 2001-2003 Free Software Foundation  # Copyright 2001-2003 Free Software Foundation
20  #  #
21  # FILE:  # FILE:
22  # WidgetFocusTab.py  # renderers/Base/Driver.py
23  #  #
24  # DESCRIPTION:  # DESCRIPTION:
25  #  #
# Line 29  Line 29 
29  from wxPython.wx import *  from wxPython.wx import *
30    
31  class BaseRenderer:  class BaseRenderer:
32    def __init__(self, instance, workspace):    def __init__(self, instance):
33      self.instance = instance      self.instance = instance
     self.workspace = workspace  
34    
35        StartupStatus(_('Loading Form renderers'))
     StartupStatus(_('Loading Renderers'))  
36    
37      self.init()      self.init()
38    
39      #
40    # For subclasses    # For subclasses
41      #
42    def init(self):    def init(self):
43      pass      pass
44    
45    
46      #
47      # Convenience
48      #
49    
50      #
51      # Set the font in use and
52      # calculate the cell sizing
53      #
54      def resetFont(self):
55        self.font = font = wxSystemSettings_GetFont(wxSYS_OEM_FIXED_FONT)
56    
57        # Get font extents
58        tmpBitmap = wxEmptyBitmap(100,100)
59        dc = wxMemoryDC()
60        dc.SelectObject(tmpBitmap)
61        dc.SetFont(font)
62        w, h = dc.GetTextExtent('0123456789')
63        self.cell_vert_margin = 2
64        self.cell_horiz_margin = 2
65        self.line_spacing = self.cell_vert_margin * 2
66        self.cell_height = h + self.line_spacing
67        self.cell_width = int(w/10)
68    
69    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.1

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