Discussion:
Announcing ScintillaTk project
Griffin, Brian
2013-06-27 04:55:14 UTC
Permalink
Announcing the ScintillaTk project (https://sourceforge.net/projects/scintillatk/)

This package provides the Scintilla widget as a Tk Toolkit widget extension. It is modeled after the Tk text widget for common or similar operations. There are also additional subcommands unique to Scintilla's features. See the ScintillaTk man page for more details. This extension was developed using Tcl/Tk 8.5 and also requires Xft support.

I think some will find it useful, and I hope many will help out to make it better.

-Brian
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-06-28 07:02:05 UTC
Permalink
Post by Griffin, Brian
This package provides the Scintilla widget as a Tk Toolkit widget extension. It is modeled after the Tk text widget for common or similar operations. There are also additional subcommands unique to Scintilla's features. See the ScintillaTk man page for more details. This extension was developed using Tcl/Tk 8.5 and also requires Xft support.
Cool! Back in the early days of Scintilla there was some interest in a Tk port of Scintilla. I had a talk with Fredrik Lundh who was working on the PythonWorks IDE at the time.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Griffin, Brian
2013-06-28 23:33:48 UTC
Permalink
X-Received: by 10.50.117.106 with SMTP id kd10mr320092igb.14.1372462430947;
Fri, 28 Jun 2013 16:33:50 -0700 (PDT)
X-BeenThere: scintilla-***@googlegroups.com
Received: by 10.50.32.105 with SMTP id h9ls706065igi.43.gmail; Fri, 28 Jun
2013 16:33:50 -0700 (PDT)
X-Received: by 10.66.122.200 with SMTP id lu8mr6270880pab.4.1372462430250;
Fri, 28 Jun 2013 16:33:50 -0700 (PDT)
Received: from relay1.mentorg.com (relay1.mentorg.com. [192.94.38.131])
by gmr-mx.google.com with ESMTPS id ga4si1493089pac.1.2013.06.28.16.33.50
for <scintilla-***@googlegroups.com>
(version=TLSv1 cipher=RC4-SHA bits8/128);
Fri, 28 Jun 2013 16:33:50 -0700 (PDT)
Received-SPF: neutral (google.com: 192.94.38.131 is neither permitted nor denied by best guess record for domain of ***@mentor.com) client-ip2.94.38.131;
Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93])
by relay1.mentorg.com with esmtp
id 1UsiAn-0002Vd-AR from ***@mentor.com
for scintilla-***@googlegroups.com; Fri, 28 Jun 2013 16:33:49 -0700
Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675);
Fri, 28 Jun 2013 16:33:48 -0700
Received: from NA-MBX-03.mgc.mentorg.com ([fe80::9a:1569:df57:45b8]) by
SVR-ORW-FEM-05.mgc.mentorg.com ([169.254.102.222]) with mapi id
14.02.0247.003; Fri, 28 Jun 2013 16:33:48 -0700
Thread-Topic: [scintilla] Announcing ScintillaTk project
Thread-Index: AQHOcvKCKwXNbXE5sk6l+oD4tGyJVJlLKj6AgAEVEwAIn-Reply-To: <23789D69-0ED6-449F-96C5-***@me.com>
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [147.34.91.1]
X-OriginalArrivalTime: 28 Jun 2013 23:33:48.0628 (UTC) FILETIME=[F080E940:01CE7457]
X-Original-Sender: ***@mentor.com
X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral
(google.com: 192.94.38.131 is neither permitted nor denied by best guess
record for domain of ***@mentor.com) smtp.mail=***@mentor.com
Precedence: list
Mailing-list: list scintilla-***@googlegroups.com; contact scintilla-interest+***@googlegroups.com
List-ID: <scintilla-interest.googlegroups.com>
X-Google-Group-Id: 656528822808
List-Post: <http://groups.google.com/group/scintilla-interest/post>, <mailto:scintilla-***@googlegroups.com>
List-Help: <http://groups.google.com/support/>, <mailto:scintilla-interest+***@googlegroups.com>
List-Archive: <http://groups.google.com/group/scintilla-interest>
Sender: scintilla-***@googlegroups.com
List-Unsubscribe: <http://groups.google.com/group/scintilla-interest/subscribe>,
<mailto:googlegroups-manage+656528822808+***@googlegroups.com>
Content-Language: en-US
Content-ID: <***@mentor.com>
Archived-At: <http://permalink.gmane.org/gmane.comp.lib.scintilla.devel/12961>
Post by Neil Hodgson
Post by Griffin, Brian
This package provides the Scintilla widget as a Tk Toolkit widget extension. It is modeled after the Tk text widget for common or similar operations. There are also additional subcommands unique to Scintilla's features. See the ScintillaTk man page for more details. This extension was developed using Tcl/Tk 8.5 and also requires Xft support.
Cool! Back in the early days of Scintilla there was some interest in a Tk port of Scintilla. I had a talk with Fredrik Lundh who was working on the PythonWorks IDE at the time.
Hi Neil,

We did attempt this several years ago, but it was difficult so we gave up. Now there's a better platform separation in Scintilla and that made this possible!

There are a few small changes in Scintilla needed to support the Tk platform (see the tk/README file for details). What are the chances of having these changes folded back into Scintilla core? If this is done, then there's no reason to have a copy of Scintilla in the ScintillaTk project.

-Brian
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-06-29 01:09:58 UTC
Permalink
Post by Griffin, Brian
There are a few small changes in Scintilla needed to support the Tk platform (see the tk/README file for details). What are the chances of having these changes folded back into Scintilla core? If this is done, then there's no reason to have a copy of Scintilla in the ScintillaTk project.
Platform.h: addition of Tk-specific PLAT_TK is fine. Why does XYPOSITION have to be int? That typedef touches a lot of code and its possible changes made and checked on the other platforms will not be checked with int until someone builds for Tk. On Windows, the mainstream GDI technology choice produces int co-ordinates but still uses float for XYPOSITION.

ScintillaWidget.h is for GTK+ only so there should be a separate header for Tk in the tk directory as is done for the Cocoa and Qt platforms. Having the GTK+ header in the main include directory is just history.

XPM.cxx/h: XPMSet was removed and XPM simplified in 3.3.2 so the changes for multiple chars per pixel won't apply. The RGBAImage format is simpler and supports multi-level alpha so RGBAImage should be used in preference to XPM. While not yet deprecated, XPM should be avoided in new code. I'd rather see XPMs converted to RGBAImage outside Scintilla than add to Scintilla's XPM code. BTW, stricmp is not portable on Windows so CompareCaseInsensitive is provided by CharacterSet.

ILexer.h: Destructors were added to interfaces but these interfaces must never be used to delete. The lifetime of the objects exposing the interfaces are managed through other mechanisms. Adding virtual destructors adds a method to the vtable of the interfaces so they will not be binary compatible. They should remain binary compatible as they can be used for calls between separately compiled objects including separate DLLs/shared libraries and application executables.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Griffin, Brian
2013-06-29 01:23:17 UTC
Permalink
On Jun 28, 2013, at 6:09 PM, Neil Hodgson <***@me.com<mailto:***@me.com>>
wrote:

Brian Griffin:

There are a few small changes in Scintilla needed to support the Tk platform (see the tk/README file for details). What are the chances of having these changes folded back into Scintilla core? If this is done, then there's no reason to have a copy of Scintilla in the ScintillaTk project.

Platform.h: addition of Tk-specific PLAT_TK is fine. Why does XYPOSITION have to be int? That typedef touches a lot of code and its possible changes made and checked on the other platforms will not be checked with int until someone builds for Tk. On Windows, the mainstream GDI technology choice produces int co-ordinates but still uses float for XYPOSITION.

ScintillaWidget.h is for GTK+ only so there should be a separate header for Tk in the tk directory as is done for the Cocoa and Qt platforms. Having the GTK+ header in the main include directory is just history.

XPM.cxx/h: XPMSet was removed and XPM simplified in 3.3.2 so the changes for multiple chars per pixel won't apply. The RGBAImage format is simpler and supports multi-level alpha so RGBAImage should be used in preference to XPM. While not yet deprecated, XPM should be avoided in new code. I'd rather see XPMs converted to RGBAImage outside Scintilla than add to Scintilla's XPM code. BTW, stricmp is not portable on Windows so CompareCaseInsensitive is provided by CharacterSet.

ILexer.h: Destructors were added to interfaces but these interfaces must never be used to delete. The lifetime of the objects exposing the interfaces are managed through other mechanisms. Adding virtual destructors adds a method to the vtable of the interfaces so they will not be binary compatible. They should remain binary compatible as they can be used for calls between separately compiled objects including separate DLLs/shared libraries and application executables.

Neil

Thanks. These changes all sound reasonable. I'll work on them.

-Brian
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-06-29 05:48:05 UTC
Permalink
Post by Griffin, Brian
Thanks. These changes all sound reasonable. I'll work on them.
If there are advantages to allowing XYPOSITION to be int then I'd like to know since that was why it was made a typedef. Since the change to floating point positions was made there hasn't been any reason to choose integer layout. Some memory could be saved by compressing down to 16 bit integers where possible but this would have to be a dynamic choice since its easy to go over 32K pixels just for a 4K paragraph.

Committed addition of PLAT_TK as
http://sourceforge.net/p/scintilla/code/ci/f7ae58be37b8a536336d412be21a06006ce8c5a4/

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Griffin, Brian
2013-06-29 06:36:58 UTC
Permalink
X-Received: by 10.50.9.7 with SMTP id v7mr371204iga.2.1372487821374;
Fri, 28 Jun 2013 23:37:01 -0700 (PDT)
X-BeenThere: scintilla-***@googlegroups.com
Received: by 10.50.85.9 with SMTP id d9ls755643igz.30.canary; Fri, 28 Jun 2013
23:37:00 -0700 (PDT)
X-Received: by 10.66.218.7 with SMTP id pc7mr3227511pac.18.1372487820493;
Fri, 28 Jun 2013 23:37:00 -0700 (PDT)
Received: from relay1.mentorg.com (relay1.mentorg.com. [192.94.38.131])
by gmr-mx.google.com with ESMTPS id rv7si429481pbc.1.2013.06.28.23.37.00
for <scintilla-***@googlegroups.com>
(version=TLSv1 cipher=RC4-SHA bits8/128);
Fri, 28 Jun 2013 23:37:00 -0700 (PDT)
Received-SPF: neutral (google.com: 192.94.38.131 is neither permitted nor denied by best guess record for domain of ***@mentor.com) client-ip2.94.38.131;
Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58])
by relay1.mentorg.com with esmtp
id 1UsomJ-0005WO-N5 from ***@mentor.com
for scintilla-***@googlegroups.com; Fri, 28 Jun 2013 23:36:59 -0700
Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675);
Fri, 28 Jun 2013 23:36:59 -0700
Received: from NA-MBX-03.mgc.mentorg.com ([fe80::9a:1569:df57:45b8]) by
SVR-ORW-FEM-05.mgc.mentorg.com ([169.254.102.222]) with mapi id
14.02.0247.003; Fri, 28 Jun 2013 23:36:58 -0700
Thread-Topic: [scintilla] Announcing ScintillaTk project
Thread-Index: AQHOcvKCKwXNbXE5sk6l+oD4tGyJVJlLKj6AgAEVEwCAABrhAIAAA7aAgABJ/oCAAA2pAA=In-Reply-To: <14E585FF-9F4B-4CA9-B8BF-***@me.com>
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [147.34.91.1]
X-OriginalArrivalTime: 29 Jun 2013 06:36:59.0795 (UTC) FILETIME=[0ED18630:01CE7493]
X-Original-Sender: ***@mentor.com
X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral
(google.com: 192.94.38.131 is neither permitted nor denied by best guess
record for domain of ***@mentor.com) smtp.mail=***@mentor.com
Precedence: list
Mailing-list: list scintilla-***@googlegroups.com; contact scintilla-interest+***@googlegroups.com
List-ID: <scintilla-interest.googlegroups.com>
X-Google-Group-Id: 656528822808
List-Post: <http://groups.google.com/group/scintilla-interest/post>, <mailto:scintilla-***@googlegroups.com>
List-Help: <http://groups.google.com/support/>, <mailto:scintilla-interest+***@googlegroups.com>
List-Archive: <http://groups.google.com/group/scintilla-interest>
Sender: scintilla-***@googlegroups.com
List-Unsubscribe: <http://groups.google.com/group/scintilla-interest/subscribe>,
<mailto:googlegroups-manage+656528822808+***@googlegroups.com>
Content-Language: en-US
Content-ID: <***@mentor.com>
Archived-At: <http://permalink.gmane.org/gmane.comp.lib.scintilla.devel/12965>
Post by Neil Hodgson
Post by Griffin, Brian
Thanks. These changes all sound reasonable. I'll work on them.
If there are advantages to allowing XYPOSITION to be int then I'd like to know since that was why it was made a typedef. Since the change to floating point positions was made there hasn't been any reason to choose integer layout. Some memory could be saved by compressing down to 16 bit integers where possible but this would have to be a dynamic choice since its easy to go over 32K pixels just for a 4K paragraph.
No advantage that I can see. The Tk abstraction for rendering text and graphics uses int coordinates. So does the underlying Xlib. There's not scaling taking place, it's drawing directly to pixmaps. The developer that did the initial implementation just propagate the int outward into Scintilla.

I've changed the code to convert to int at the Tk API call instead. It makes sense to me to keep the editor at an abstract level and covert, if necessary, just before rendering.
Post by Neil Hodgson
Committed addition of PLAT_TK as
http://sourceforge.net/p/scintilla/code/ci/f7ae58be37b8a536336d412be21a06006ce8c5a4/
Thanks!

I've made all the other changes, except for the XPM changes, I have to look to see if we need XPM in or application. I suspect not, but I have to make sure.

I think the ILexer destructors where put in due to valgrind errors. I'm waiting to hear back from the person that made the change to see why it was made.

-Brian
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...