[wxPython] Announcement of pyDE (Texteditor)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Announcement of pyDE (Texteditor)

Dirk Holtwick
Hi,

I would like to inform you about a new project I have started
and wich could be interesting for wxPython too, because
it is based on a totaly new written Editor-Widget and this one
could be integrated into wxPython one day, if there is some
interest. I also modified the handling of the wxSizer class.

The tool itself is a new editor for Python wich offers many
features like syntax highlightning and folding. Just have a look at

        http://www.spirito.de/pyde

Yours Dirk

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Announcement of pyDE (Texteditor)

Harm van der Heijden
On Fri, 27 Aug 1999, Dirk Holtwick wrote:
> The tool itself is a new editor for Python wich offers many
> features like syntax highlightning and folding. Just have a look at
>
> http://www.spirito.de/pyde

Looks impressive. It's a lot faster then I expected a 100% python
editor could be. There's a slight problem with screen updates though;
every time you move the cursor, the whole screen is (visibly) redrawn.

You may also be interested to know that the next wxPython beta may come
with an alpha version of an editor widget module (i.e. a wxPython C++
library outside of the core wxc module). It's a wxWin editor written in
C++ that I 'stole' from the wxStudio project. It's already in cvs, so
you can check it out (pun intented) if you want.

It also supports syntax highlighting and, being C++,  is somewhat
faster. The downside is that it isn't as easily customized as your
widget.  It also needs some work to move it from alpha to beta status.

Perhaps it is useful to define a standard editor interface
that both editors should adhere to; then the editor for the python IDE
can be either.  I noticed in your README file that you have plans to
make the IDE shareware software. The editor module is GPL'ed, but if it
is a non vital plugin, it can still be used in non-GPL projects.

Regards,

Harm

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Announcement of pyDE (Texteditor)

Robin Dunn


> On Fri, 27 Aug 1999, Dirk Holtwick wrote:
> > The tool itself is a new editor for Python wich offers many
> > features like syntax highlightning and folding. Just have a look at
> >
> > http://www.spirito.de/pyde
>
> Looks impressive. It's a lot faster then I expected a 100% python
> editor could be.

Yes, very nice indeed.


> There's a slight problem with screen updates though;
> every time you move the cursor, the whole screen is (visibly) redrawn.
>

Undoubtedly due to the self.UpdateView() at the end of OnChar and the
dc.Clear() in Draw.  There are a couple ways to reduce or eliminate flicker.
(I havn't looked real close at your code yet so forgive me if you are
already doing one of these...)

1. Only draw the line or lines that have changed.

2. Use Double-Buffering.  This involves drawing on a wxMemoryDC the same
size as your window first, and then Blit'ing it's bitmap to the real DC.

3. Implement a handler for EVT_ERASE_BACKGROUND which does nothing.  This
works well if your are double-buffering or otherwise drawing the entire
canvas.


> You may also be interested to know that the next wxPython beta may come
> with an alpha version of an editor widget module (i.e. a wxPython C++
> library outside of the core wxc module).

We'll see.  Because of it's license I may not distribute it in the same
packages just to be safe.  But it can certainly be made available for
download as an add-on.

>
> Perhaps it is useful to define a standard editor interface
> that both editors should adhere to; then the editor for the python IDE
> can be either.

This would be nice, especially since there may someday be a syntax
highlighting editor that is an official part of wxWindows.

Robin


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Announcement of pyDE (Texteditor)

Dirk Holtwick

> > Looks impressive. It's a lot faster then I expected a 100% python
> > editor could be.
> Yes, very nice indeed.

Thanks.

> > There's a slight problem with screen updates though;
> > every time you move the cursor, the whole screen is (visibly) redrawn.
> Undoubtedly due to the self.UpdateView() at the end of OnChar and the
> dc.Clear() in Draw.  There are a couple ways to reduce or eliminate flicker.
> (I havn't looked real close at your code yet so forgive me if you are
> already doing one of these...)

As this is an early beta release, I didnĀ“t worry about that yet. It was more important
to me that it works. I already started to handle this problems, but it is not trivial because
of the planned syntax correction.

> 3. Implement a handler for EVT_ERASE_BACKGROUND which does nothing.  This
> works well if your are double-buffering or otherwise drawing the entire
> canvas.

I have a question. Is it possible to implement an own signal? I would like to derivate
the wxEditor class and the superclass should become aware of changes to update
the stausbar to show x,y positions.

> > You may also be interested to know that the next wxPython beta may come
> > with an alpha version of an editor widget module (i.e. a wxPython C++
> > library outside of the core wxc module).
> We'll see.  Because of it's license I may not distribute it in the same
> packages just to be safe.  But it can certainly be made available for
> download as an add-on.

Well, does it offer the possibility of doing folding and selecting special non
editable lines?

> > Perhaps it is useful to define a standard editor interface
> > that both editors should adhere to; then the editor for the python IDE
> > can be either.
> This would be nice, especially since there may someday be a syntax
> highlighting editor that is an official part of wxWindows.

Would be a nice idea. But I have some ideas for the IDE that may not be
implemented in wxStudio. The focus is more on Python than on C++ and
wxWindows. Because of the synax of this language I would like to implement
something like GFA-Basic-Editor of the old Atari and Amiga system.
Something like an ideot-prove-editor ;-)

Thanks for your suggestions. Did you have a look on the exAmple.py code?
It shows a new way of constructing BoxSizers.

Yours Dirk

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Announcement of pyDE (Texteditor)

harm-3
Dirk Holtwick wrote:
> > > You may also be interested to know that the next wxPython beta may come
> > > with an alpha version of an editor widget module (i.e. a wxPython C++
> > > library outside of the core wxc module).
> > We'll see.  Because of it's license I may not distribute it in the same
> > packages just to be safe.  But it can certainly be made available for
> > download as an add-on.
>
> Well, does it offer the possibility of doing folding and selecting special non
> editable lines?

No, but it can probably be modified to do that. I forgot to mention that is
does allow unlimited Undo/Redo. However... (see below)

> > > Perhaps it is useful to define a standard editor interface
> > > that both editors should adhere to; then the editor for the python IDE
> > > can be either.
> > This would be nice, especially since there may someday be a syntax
> > highlighting editor that is an official part of wxWindows.
>
> Would be a nice idea. But I have some ideas for the IDE that may not be
> implemented in wxStudio. The focus is more on Python than on C++ and
> wxWindows. Because of the synax of this language I would like to implement
> something like GFA-Basic-Editor of the old Atari and Amiga system.
> Something like an ideot-prove-editor ;-)

Perhaps you misunderstood me slightly. The editor is not really devoted to
wxStudio's purposes, but is a quite general editor plugin. In fact, in
wxStudio there's also an editor with the same API, but completely
implemented using a standard wxTextCtrl (obviously leaving out things such
as syntax highlighting).

I'm not familiar with the GFA-Basic-Editor you mention (spend most of my
Amiga hours playing games, not hacking :-), but I do appreciate your point:
since python is an interpreted language, and one with *excellent* runtime
diagnostics and stuff, an IDE would need a very *dedicated* editor to
exploit all those python features that potentially make python developing
easier.

The c++ editor module might very well find a place in wxPython apps that
simply need something that's more flexible and capable than your basic
textctrl, but still is a traditional editor.

While you're still fleshing out you design of pyde, it's probably too early
to try and make it all fly with a c++ module. After all, we're into python
in the first place because of certain advantages over c++ and other
languages, right? I'll be following the pyde development with interest. I
think the first release shows tremendous promise.

Regards,

Harm


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Announcement of pyDE (Texteditor)

Robin Dunn
In reply to this post by Dirk Holtwick
>
> I have a question. Is it possible to implement an own signal? I would like
to derivate
> the wxEditor class and the superclass should become aware of changes to
update
> the stausbar to show x,y positions.

As in an Event?  I started work on allowing python derived events to be sent
via the wxWindows event system but I haven't completed it yet.  There are
other ways to do this in Python though that would be a lot easier.  The
Observer or Publish/Subscribe design pattern comes to mind.  If the wxEditor
allowed an Observer class to register with it and then when the editor's
state changes it calls the Notify method of any registered objects, then
that would do the trick.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users