Copyright and License information
Alphabetic Index | Subject Index | Variable Wrappers |
__ A B C D E F G H I L M P R S T U V W |
Overview:
This control wraps the Scintilla editor component (written by Neil Hodgson) to work with wxPython. It's a complex control that requires a lot of study to use, but it's better than writing your own :-). Scintilla is a wonderful addition to the wxPython library.
Writing this documentation showed this author the depth of the Scintilla Editor (great work, Neil) and the adept way that it was blended into the wxWindows/wxPython environment by Robin Dunn. Credit is also due to Greg Smith. He revised much of the Scintilla Documentation; which made this task a lot easier (although it was about 6 solid weeks of work, believe it or not!).
This documentation is targeted specifically at wxPython users, and has been carefully (one hopes) checked for accuracy by poring thru the Scintilla code, and the wxWindows/wxPython layers. The arguments shown for Python method calls have the keywords expected by the Python adaptation layer, although generally you do not need to use them. Return types are shown; note that many methods return None even though one might expect them to return nothing at all. Folks interested more in WxWindows- or Scintilla-level programming may benefit reading these pages just to see some of the many details I uncovered during the writing process, but of course certain information will be incorrect - most notably with respect to calling parameters and return values as Python does not use pointers. Also, a number of method names in the wxPython version are different than the names shown in the Scintilla documentation; some of the methods available in wxPython (and wxWindows) versions of the STC are not available in the Scintilla DLL version.
In a number of cases, comments from the Scintilla source code are incorporated into this documentation for clarity; often these comments are massaged so that variable names, etc. match those used in the wxPython port. Some of the information in this document is from the Scintilla documentation, again, massaged to match what makes sense for wxPython. The abbreviation STC is used throughout rather than writing wxStyledTextCtrl a few hundred extra times.
If you find any errors or have any questions please contact jeff@sasmor.com. Please note that as this is a new document (issued 01 January 2003), there are likely to be some errors.
PLEASE do not send questions about use of the STC, please use the appropriate listserv for that!
Miscellany:
from wxPython.stc import *
Pointers in wxPython:
For those who aren't aware of it, the C/C++ pointers that are used extensively in wxWindows are translated to and from string objects:
hexaddress_pointertypefor example:
XXXXXXXX__wxStyledTextCtrl_pis the return value from wxStyledTextCtrl.__init__().
This is due to the SWIG interface, and the details of it are both transparent and beyond the scope of this guide. The interested person is directed to look at WXPYTHON/WXSWIG/Runtime/libpy.c for details of the conversion.
The reason for mentioning this here at all, is that when a phrase like "returns a wxColour" is used, what's meant is that a pointer-string is returned that can be used to reference the wxColour.
Editorial -- Honestly, unless I've misunderstood this, it seems remarkably inefficient to convert back and forth to and from strings every time you create or reference/use one of these 'pointers.' Could it be endian issues? Wouldn't a data structure of some kind with the pointer maintained as a long int (need support for 64 bit addressing) be better? Well, I'm sure that there must be a good reason...
__ A B C D E F G H I L M P R S T U V W
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
CallTips | ||
CallTipActive CallTipCancel |
CallTipPosAtStart CallTipSetBackground |
CallTipSetHighlight CallTipShow |
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
Go to Top of Alphabetic Index
This documentation is Copyright © 2003 Jeff Sasmor. jeff@sasmor.com
Except for inclusion in a physical, printed, or virtual book (such as an E-Book), permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted, provided that the all copyright notices herein appear in all copies and that this copyright notice, this permission notice, and the following disclaimer appear in all copies. For re-use not permitted by this permission, please contact jeff@sasmor.com. why
JEFF SASMOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS DOCUMENTATION, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL JEFF SASMOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS DOCUMENTATION OR THE RELATED SOFTWARE.
Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Why this seemingly spurious restriction on copying and what does it mean? Basically, if you want to include the material provided here in a book or ebook you will need to speak to the author. If you want to include it in documentation accompanying wxPython or wxWindows, that's fine as long as you include the copyright notices provided by the author and by Neil Hodgson.