[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Best way to create a virtual keyboard
- From: u07ih abdn ac uk
- To: gtk-app-devel-list redhat com
- Subject: Re: Best way to create a virtual keyboard
- Date: Tue, 19 Oct 1999 13:21:21 +0100 (BST)
> I have Eric Harlow's book. I've browsed through it and have read through
> some sections in detail. There appears to be more than one way to do it:
> one way would be to use pixmaps that I would create using gimp and the
> other would be to use the GDK drawing primitives within the drawing area
> widget. I was hoping that someone more experienced than I could suggest
> which of these two approaches would be the best one to take - or perhaps
> there is another technique that would better still.
The way I would do it is create a new widget type (GtkKey) then derive 2 new
types of that for white keys and black keys. (The black keys would be easy, as
they're all the same shape).
Then make a new container class that has functions like gtk_keyboard_add_key
(GTK_KEYBOARD (kb), middlec); and it will add the key in the next position.
This is the longer way, but is probably the most flexible and also possibly the
easiest to detect button clicks and the like, as you can derive GtkKey from
GtkButton, which already has the signal handlers for button click, press,
release etc.
Iain.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]