BioPerl
view release on metacpan or search on metacpan
examples/tk/gsequence.pl view on Meta::CPAN
{
my ( $window ) = @_;
my $menubar;
my $item_factory;
my $accel_group;
$accel_group = new Gtk::AccelGroup();
# This function initializes the item factory.
# Param 1: The type of menu - can be 'Gtk::MenuBar', 'Gtk::Menu',
# or 'Gtk::OptionMenu'.
# Param 2: The path of the menu.
# Param 3: The accelerator group. The item factory sets up
# the accelerator table while generating menus.
$item_factory = new Gtk::ItemFactory( 'Gtk::MenuBar',
'<main>',
$accel_group );
# This function generates the menu items. Pass the item factory,
# the number of items in the array, the array itself, and any
# callback data for the the menu items.
$item_factory->create_items( @menu_items );
# Attach the new accelerator group to the window.
$window->add_accel_group( $accel_group );
ide/bioperl-mode/site-lisp/bioperl-init.el view on Meta::CPAN
:keys "\\[bioperl-view-pod-synopsis]"))
(define-key map [bp-pod]
'(menu-item "View pod" bioperl-view-pod
:help "Examine entire pod of a module"
:keys "\\[bioperl-view-pod]"))
(define-key map [bp-pod-mth]
'(menu-item "View method pod" bioperl-view-pod-method
:help "View pod (Title:, Usage:, etc) for a single method"
:keys "\\[bioperl-view-pod-method]"))
map)
"Menu-bar map for doc functions in bioperl-mode.")
(defvar menu-bar-bioperl-ins-menu
(let (
(map (make-sparse-keymap "BioPerl Ins"))
)
(define-key map [bp-ins-arr]
'(menu-item "Insert container template" bioperl-insert-array-accessor
:help "Insert template functions for an object array"
:keys "\\[bioperl-insert-array-accessor]"))
ide/bioperl-mode/site-lisp/bioperl-init.el view on Meta::CPAN
:keys "\\[bioperl-insert-generic-class]"))
(define-key map [bp-ins-acc]
'(menu-item "Insert accessor template" bioperl-insert-accessor
:help "Insert accessor (getter/setter) with std pod"
:keys "\\[bioperl-insert-accessor]"))
(define-key map [bp-ins-mod]
'(menu-item "Insert module identifier" bioperl-insert-module
:help "Insert module identifier, with completion"
:keys "\\[bioperl-insert-module]"))
map)
"Menu-bar map for insertion functions in bioperl-mode")
;;
;; keymap
;;
;; principles:
;; C-c accesses mode functions
;; meta key commands - documentation reading (pod display, etc.)
;; control key command - documentation writing (template insertions, etc.)
;;
( run in 0.720 second using v1.01-cache-2.11-cpan-49f99fa48dc )