Signal help

Hey all, I'm pretty new to GUI programming so forgive me for my
ignorance.  I've been pouring over the documentation for both Gtk2 and
gtk2-perl, as well as googling for help, but I haven't found any

I have three challenges before me.

1)  I have a TextView widget with a TextBuffer.  I wish to catch all
attempts the user makes to change the TextBuffer before the change is
applied and do some processing on it.  Depending on the results of my
processing, I want to either block the attempt silently or let it
through.  This is somewhat based on the changes they are trying to
make and other external conditions.  I'm held back here by not knowing
how to catch such an attempt to change the buffer and either stop it
or let it through optionally.  I think it'd be simple, but the right
way to do it eludes me.

2)  I also need to be able to cache these attempts to change the
buffer and possibly duplicate the change in another buffer.  I'm not
sure how easy that would be but if anyone has any pointers, I'd
appriciate it.

3) Lastly I need to add my own code into the main Gtk loop.  This
should be really easy but I can't figure it out.

Any help would be appriciated.  Thanks.

Charles Josephs

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]