Re: Re[2]: GTK Menu Questions
- From: Lex Trotman <elextr gmail com>
- To: Lothar Scholz <llothar web de>, gtk-list gnome org
- Subject: Re: Re[2]: GTK Menu Questions
- Date: Tue, 20 Apr 2010 22:19:45 +1000
Ok, for multi character command sequences, GTK does not provide any built-in support. You can of course catch keyboard events and handle it yourself though. Any keys that you don't want to handle you can just pass through to GTK.
You will also have to arrange for menu display of multi-key sequences yourself, maybe by packing an HBox into the menu item (menu items can have any child) so you can place in the HBox a left aligned label for the menu text and a right aligned label that you can show your extended key sequence in. And an icon on the far left if you want it.
There are some useful functions that turn keyboard codes into text like "ctrl-W" that you can use.
Cheers
Lex
On 20 April 2010 21:59, Lothar Scholz
<llothar web de> wrote:
Hello Lex,
Tuesday, April 20, 2010, 6:14:42 AM, you wrote:
>
|
1) Can i draw my own accelerator key description in the menu items?
(For people who know the textmate editor for MacOSX - its pretty much
the same what i want do, drawing tab and insert symbols).
I don't have Mac access so I can't look at textmate, but GTK lets you set accelerators for menu items, see doc on accelerator groups, accelerator maps and accelerator paths. These also support saving settings in config files so your users can change accelerators to suit themselves.
|
Unfortunately i need much then possible with GTK's system.
It can't even display (far from handling) multi-key accelerators like Ctrl-W Ctrl-A
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]