X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bbf7159c8211a398e573122c66b93722f5125c60..908f8fc481c0503bf8be5002e5d5208666da7649:/wxPython/samples/ide/activegrid/tool/HtmlEditor.py diff --git a/wxPython/samples/ide/activegrid/tool/HtmlEditor.py b/wxPython/samples/ide/activegrid/tool/HtmlEditor.py index fa5d09de98..024a0b13f2 100644 --- a/wxPython/samples/ide/activegrid/tool/HtmlEditor.py +++ b/wxPython/samples/ide/activegrid/tool/HtmlEditor.py @@ -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 = [ @@ -197,16 +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\xd3IDAT8\x8dcddbf\xa0\x040\xfe\xbf\xd1\xf3\x9f\x12\x03X\xfe}\xbeI\ -\x91\x0b\x98(\xd2=(\x0c`\x90W\xd2\xfc\x0f\x030\xb6\xbc\x92\xe6\x7f\x1d\x03\ -\xf3\xffN\xae\xde\xff\xff\xff\xff\xff\xdf\xc0\xd8\xfa\xff\xb5;O\xfe_\xbb\xf3\ -\xe4\xbf\x8e\x819\\\xcd\xd7_\xff\xff\xb3<|x\x9dAAY\x0b\xc5\xd0\x07w\xaf1\xd8\ -\xdbZ0\xec\xdd\xb5\x85\x81\x81\x81\x81\xe1\xdd\xf3\x1b\x0c\xab\x97\xcef\xe0`\ -ca\xf8\xfa\xf1\x19\\\x1d\x17+\x03\x03\x0b\x03\x03\x03Cqq>\xc3\xd3\x17o\x18V,\ -]\n\x97de\xe7\x81\xb3\x199\xc4\x18\x0e\x1d:\xc2 "*\xce\xf0\x8f\x11!\x8e\xd3\ -\x0b\xd8\xd8\xa7\x8e\xed\xf9\x7f\xf1\xcca\x14o\xca+i\xfeg\xfc{:\x95\xa2\x844\ -\xf0\xd1H\xb1\x01\x8c\x94\xe6F\x8a]\x00\x00YXz\xf0\x97\x87\'\x1a\x00\x00\x00\ -\x00IEND\xaeB`\x82' +\x00\x01\xeeIDAT8\x8d}\x92?h\x13a\x18\xc6\x7fw=\x8d\xb4\x98\xa9-uP\x1a\xc9p$\ +\xdc`\xd0C\x8d\x8b)\xc5!Z\x11\xcc\xd0A\xd0*\xa8\x93\x8b8\x18\x11\x14RD\x07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