]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/ide/activegrid/tool/HtmlEditor.py
More compile fixes.
[wxWidgets.git] / wxPython / samples / ide / activegrid / tool / HtmlEditor.py
index e026fb978bc16a404baeef3d1cf09c4eb94f3d50..024a0b13f2f2e88a81cd90be21cabdf6e8e4e8e2 100644 (file)
@@ -76,7 +76,6 @@ class HtmlView(CodeEditor.CodeView):
 ##        sizer = wx.BoxSizer(wx.HORIZONTAL)
 ##        sizer.Add(self._notebook, 1, wx.EXPAND)
 ##        frame.SetSizer(sizer)
-##        frame.SetAutoLayout(True)
 ##
 ##
 ##    def OnNotebookChanging(self, event):
@@ -105,20 +104,22 @@ class HtmlService(CodeEditor.CodeService):
 class HtmlCtrl(CodeEditor.CodeCtrl):
 
 
-    def __init__(self, parent, ID = -1, style = wx.NO_FULL_REPAINT_ON_RESIZE):
-        CodeEditor.CodeCtrl.__init__(self, parent, ID, style)
+    def __init__(self, parent, id=-1, style=wx.NO_FULL_REPAINT_ON_RESIZE):
+        CodeEditor.CodeCtrl.__init__(self, parent, id, style)
         self.SetLexer(wx.stc.STC_LEX_HTML)
         self.SetProperty("fold.html", "1")
 
+
     def GetMatchingBraces(self):
         return "<>[]{}()"
 
+
     def CanWordWrap(self):
         return True
 
 
     def SetViewDefaults(self):
-        CodeEditor.CodeCtrl.SetViewDefaults(self, configPrefix = "Html", hasWordWrap = False, hasTabs = True)
+        CodeEditor.CodeCtrl.SetViewDefaults(self, configPrefix = "Html", hasWordWrap = True, hasTabs = True, hasFolding=True)
 
 
     def GetFontAndColorFromConfig(self):
@@ -155,7 +156,11 @@ class HtmlCtrl(CodeEditor.CodeCtrl):
 class HtmlOptionsPanel(STCTextEditor.TextOptionsPanel):
 
     def __init__(self, parent, id):
-        STCTextEditor.TextOptionsPanel.__init__(self, parent, id, configPrefix = "Html", label = "HTML", hasWordWrap = True, hasTabs = True)
+        STCTextEditor.TextOptionsPanel.__init__(self, parent, id, configPrefix = "Html", label = "HTML", hasWordWrap = True, hasTabs = True, hasFolding=True)
+
+
+    def GetIcon(self):
+        return getHTMLIcon()
 
 
 HTMLKEYWORDS = [
@@ -190,7 +195,6 @@ HTMLKEYWORDS = [
 # Icon Bitmaps - generated by encode_bitmaps.py
 #----------------------------------------------------------------------------
 from wx import ImageFromStream, BitmapFromImage
-from wx import EmptyIcon
 import cStringIO
 
 
@@ -198,15 +202,26 @@ def getHTMLData():
     return \
 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
 \x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
-\x00\x00\xcdIDAT8\x8dcd`f\xf8\xcf@\x01`\xfc\x7f\xa3\x87"\x03X\xfe}\xbeI\x89~\
-\x06&\x8at\x0f\n\x03\x18\xe4\x954\xff\xc3\x00\x8c-\xaf\xa4\xf9_\xc7\xc0\xfc\
-\xbf\x93\xab\xf7\xff\xff\xff\xff\xff70\xb6\xfe\x7f\xed\xce\x93\xff\xd7\xee<\
-\xf9\xafc`\x0eW\xf3\xf5\xd7\xff\xff,\x0f\x1f^gPP\xd6B1\xf4\xc1\xddk\x0c\xf6\
-\xb6\x16\x0c{wma````x\xf7\xfc\x06\xc3\xea\xa5\xb3\x198\xd8X\x18\xbe~|\x06W\
-\xc7\xc5\xca\xc0\xc0\xc2\xc0\xc0\xc0P\\\x9c\xcf\xf0\xf4\xc5\x1b\x86\x15K\x97\
-\xc2%Y\xd9y\xe0lF\x0e1\x86C\x87\x8e0\x88\x88\x8a3\xfccD\x88\xe3\xf4\x026\xf6\
-\xa9c{\xfe_<s\x18\xc5\x9b\xf2J\x9a\xff\x19\xff\x9eN\xa5(!\r|4\x0e\x03\x03\
-\x00R\xe4{\xe74\x9e\xbb\xd1\x00\x00\x00\x00IEND\xaeB`\x82' 
+\x00\x01\xeeIDAT8\x8d}\x92?h\x13a\x18\xc6\x7fw=\x8d\xb4\x98\xa9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x90\xf8u\xbde\x13n\xb6\x96I[\x08\xa2N$(~\x8b#\xfb\x12H\x1f\x1e^\
+\xeaZQ-W4\x0f\x9f\xaa\x01~\x8eO\r\x92\xc9\x1b\xc8>KlC\xbc{!\x1c\xf0\xf4\x8e\
+\xa0*\xb2\x90|\xb4\xcf\xe1\xa0-v\xd6\xe5\xb3\xd3\x08\x828\xd0\x8b\x01X\xcb\
+\xa2\xe5J\xdc\x7f\xe0o\xc3\'\n\x84\x03\x1eb\x91C\xa8\x8a,\xfc\x05\xf6\x0e\
+\xbfa\x1f\xe7Z\xfb\x00\x00\x00\x00IEND\xaeB`\x82' 
 
 
 def getHTMLBitmap():
@@ -217,6 +232,4 @@ def getHTMLImage():
     return ImageFromStream(stream)
 
 def getHTMLIcon():
-    icon = EmptyIcon()
-    icon.CopyFromBitmap(getHTMLBitmap())
-    return icon
+    return wx.IconFromBitmap(getHTMLBitmap())